Title: ACF date fields format questions
Last modified: February 25, 2021

---

# ACF date fields format questions

 *  Resolved [GusGF](https://wordpress.org/support/users/gusgf/)
 * (@gusgf)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/acf-date-fields-format-questions/)
 * I created a date (i.e. date picker) field (event_date) using ACF. I’m using a
   query to fetch posts (events) after today’s date e.g. event_date>=date(‘Ymd) 
   seems to work, pls ignore the syntax for brevity sake.
 * In the ACF plugin when I look at the date format for event_date it’s format is
   dd/mm/yyyy as confirmed by the output of: echo get_field(‘event_date’); so is
   this being determined by the Return Format – The format returned via template
   functions option which I set when creating the ACF field?
 * If so, why then when I run the query in a WP_Query with
    event_date>=date(‘dmY)
   my query fails to work correctly. event_date>=date(‘Ymd) my query works correctly.
   Again pls ignore the syntax for brevity sake. Are all dates coming from the database
   via queries in a default format i.e. ‘Ymd’?
 * Can I also ask regarding the following get_field(‘event_date’, false, false),
   with the second boolean parameter if it’s set to true where is the formatting
   actually defined?

Viewing 1 replies (of 1 total)

 *  Thread Starter [GusGF](https://wordpress.org/support/users/gusgf/)
 * (@gusgf)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/acf-date-fields-format-questions/#post-14103952)
 * Okay so it looks like all dates queried from the WP DB directly will be in the
   format ‘Ymd’, like in a WP_Query query.
    Using the ACF functions e.g. `get_field(‘
   event_date’, false, false)` The second boolean parameter means… **false**: return
   a date in the WP DB format i.e. ‘Ymd’ **true**: use the ACF’s return format set
   in the plugin
    -  This reply was modified 5 years, 4 months ago by [GusGF](https://wordpress.org/support/users/gusgf/).

Viewing 1 replies (of 1 total)

The topic ‘ACF date fields format questions’ is closed to new replies.

 * ![](https://ps.w.org/advanced-custom-fields/assets/icon.svg?rev=3207824)
 * [Advanced Custom Fields (ACF®)](https://wordpress.org/plugins/advanced-custom-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-custom-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-custom-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-custom-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-custom-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-custom-fields/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [GusGF](https://wordpress.org/support/users/gusgf/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/acf-date-fields-format-questions/#post-14103952)
 * Status: resolved