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));

    Thanks in advance!