Home › Forums › General Issues › Check date on ACF field › Reply To: Check date on ACF field
you cannot compare dates in “d/m/y” format. In order to compare dates they must be in some format that has year first, month second and day last.
You do not need to change your date format. You can get the date field without formatting by supplying the 3rd argument in get_field()
$date = get_field('art_date_from', false, false);
This will return the date formatted using in “Ymd”
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.