Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m also looking for this …

    https://uproot.us/docs/date/
    but I want to change in numbers…

    <?php
    // Output “2012-09-18 14:20:00”
    echo $cfs->get(‘my_date’);

    // Output “September 18, 2012”
    echo date(‘F j, Y’, strtotime($cfs->get(‘my_date’)));

    // Output “2012”
    echo date(‘Y’, strtotime($cfs->get(‘my_date’)));
    ?>

    Plugin Author Matt Gibbs

    (@mgibbs189)

    That’s correct, the date will always be stored in YYYY-MM-DD format in the database. If you need to change it on the front-end, then wrap the date within the date() function, as stunomatic pointed out.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change date format’ is closed to new replies.