Home Forums General Issues get_posts, filtering by acf date field Reply To: get_posts, filtering by acf date field

  • @hube2
    thanks for your input.
    I tried this as well, but unfortunately it does not have any effect either.

    When I print out the event_date I get a value like 2019-12-04 19:30:00.
    I think with your code I am comparing my $startDate which is something like 20191201 to 2019-12-04 19:30:00.

    I assume to use a compare operator of > I need to have actual numbers.
    So using the $startDate works but we would have to compare it against 20191204 instead 2019-12-04 19:30:00.

    Could that be the issue?
    And how would I transform the event_date within get_posts

    Thanks for your input.Cheers