Home Forums Add-ons Repeater Field Change Date format in Repeater Field Reply To: Change Date format in Repeater Field

  • I would do this by setting my return value to be formatted as Y-m-d and then I would format the date/time the way I want by using PHP function date() and strtotime(). The reason for setting the display to Y-m-d is because this is a format that will not be confused when using strtotime()

    $acf_date = get_field('my_date_field');
    // format date
    $date = date('l d F Y', strtotime($acf_date));
    // OR
    $date = date('F Y', strtotime($acf_date));