Home › Forums › General Issues › Query not running as expected › Reply To: Query not running as expected
Ah ok thanks for the explanation! I’ve now changed the Return Format to Ymd to make the comparison and any if statements further down the page easier to work with. I’ve also removed the following line from all queries.
'type' => 'DATE',
My next task is to simply re-format the date in terms of how it’s displayed as it’s just using Ymd for the moment. I presume I can use something like the following (haven’t got time to test at the moment until later today)?
$date = get_field('date');
$date2 = date("F j, Y", strtotime($date));
https://apexcinemas.andrewcourtney.co.uk/coming-soon/
https://apexcinemas.andrewcourtney.co.uk/films/no-time-to-die-2/
Thanks in advance!
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.