Home › Forums › General Issues › Date Field not displaying › Reply To: Date Field not displaying
Hi @greycam
Could you please make sure that you were debugging the correct variables?
Could you please try the following code:
$departure_date = get_field('departure_date', false, false);
$departure_date = new DateTime($departure_date);
echo "\nderpature_date: \n" . $departure_date;
echo "\nformatted derpature_date: \n" . $departure_date->format('j M Y');
Thanks 🙂
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.