Home › Forums › General Issues › Date Field not displaying › Reply To: Date Field not displaying
So I changed my code around
It now looks like this
$departure_date = get_field('departure_date', false, false);
$departure_date = new DateTime($departure_date);
<?php echo $depature_date->format('j M Y'); ?>
It now displays the date “Departs 9 Jan 2017” even if the date is set to Jun 1, 2017
When I do $date on it’s own I get: 20170601
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.