SOLVED: Meta query loop with ACF Datepicker field returning no results

I am trying to sort query results by an ACF Datepicker field by the name ‘date’ and only show results which are having a date in ‘future’. It’s not showing any results. Choosing ‘Lesser than’ compare shows every post in the CPT regardless of its relation with the current date. What am I doing wrong?

1
2

Hi Khan,

Setting this as Meta value will make it work: {echo:date(Ymd)}

2 Likes

Thank you very much, Sridhar. But this a weird behaviour as I used the same date format throughout.

1 Like

I have a similar issue.
There is a basic text element for testing with this dynamic data ({acf_start_date} {current_date:Ymd}), which renders out - 20231216 20231211. This works when I do not add a meta query to the loop.
But when I add this query, there are no results.

I have tried different data types, but still no results.
I have a similar setup on the other website, but it is working there. Maybe there are some settings that I am not aware of?