Home Forums Front-end Issues Date Pick Field problem


Date Pick Field problem

  • Hello,

    i have two field for date and on my code i put this:

    <p>Data Inizio Evento: <?php $date = DateTime::createFromFormat('Ymd', get_field('data-inizio-evento'));
    echo $date->format('d-m-Y'); ?></p>
    <p>Data Fine Evento: <?php $date = DateTime::createFromFormat('Ymd', get_field('data-fine-evento'));
    echo $date->format('d-m-Y'); ?></p>

    So in backend in this field i have, for “data-inizio-evento” 15/05/2015 and for “data-fine-evento” 02/06/2015.

    In frond-end i see this:

    Data Inizio Evento: 15-08-3006

    Data Fine Evento: 15-08-0207

    Incorrect date….why?

  • What version of ACF are you using?

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Date Pick Field problem’ is closed to new replies.