Home › Forums › Feature Requests › Date format in meta table › Reply To: Date format in meta table
Hi @timbofield
No ACF saves the date -format in Ymd since that’s the most versatile dateformat to work with. However this shouldn’t be a problem since you can easily retrieve it on the front end where you need it and reformat it to yy-mm-dd (or Y-m-d as it would be with PHP).
So if I where you I’d make sure that when you save the meta value outside of ACF to save it as Ymd like this:
$Ymd = date('Ymd', strtotime($mydatestring));
and to display it in whatever format you want on the front end you do a very similar:
echo date( 'Y-m-d', strtotime( get_field('my_date_field') ) );
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!
🚀 ACF & ACF PRO 6.0.7 are now available.
— Advanced Custom Fields (@wp_acf) January 18, 2023
✨This release contains bug fixes and improvements while we continue to work on the next major release of ACF.https://t.co/wQgAOpwmUI
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.