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
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.