Support

Account

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.