Support

Account

Home Forums General Issues Check date on ACF field Reply To: Check date on ACF field

  • you cannot compare dates in “d/m/y” format. In order to compare dates they must be in some format that has year first, month second and day last.

    You do not need to change your date format. You can get the date field without formatting by supplying the 3rd argument in get_field()

    
    $date = get_field('art_date_from', false, false);
    

    This will return the date formatted using in “Ymd”