Home › Forums › Backend Issues (wp-admin) › Date Time Picker and Post Loop › Reply To: Date Time Picker and Post Loop
Hi @poorpaddy
ACF PRO saves the date time picker field in a MySQL’s date time format (yyyy-mm-dd hh:mm:ss). So, you need to change how you get the current date time and the ‘type’ query like this:
$currentdate = date('Y-m-d H:i:s');
...
'type' => 'DATETIME',
This page should give you more idea about it: https://www.advancedcustomfields.com/resources/date-time-picker/.
I hope this helps 🙂
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.