Home › Forums › General Issues › weeknumber for events in the current week › Reply To: weeknumber for events in the current week
ACF stores an SQL date. If we were talking about a straight MySQL query on the database you could do this. This can also be done with a date query, but this only works on the standard WP post date field.
There isn’t a way to use WP_Query() and meta_query to compare the dates in the a custom field against a week number. You need to get the first day of the week and the last day of the week and look for dates between these 2 values.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.