• Resolved Christopher Mitchell

    (@chrismitchell)


    I am using an ACF field to have a custom date for a ACF custom event function.

    I can’t seem to get any custom date format on the ACF date field. Can anyone point me in the direction about how to set the date format using the ACF Date Field?

    I want to display using: F j, Y if possible?

    Any help would be great 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Christopher Mitchell

    (@chrismitchell)

    Also just to add to this problem, it won’t take into account the date order from the ACF field of date. I’m using this loop:

    [loop type=events count=2 acf_date=date value=future]
    Event Name: [field title]
    Date: [field acf_date=date]
    Location: [field location]
    [/loop]

    So I need to have it display the date in the F j, Y format and also be in the correct date order displaying the future dates, currently it doesn’t display anything when I have the value=future.

    Any help would be great!

    David

    (@topsquirrel)

    Not sure if this helps Christopher, is it the date_format parameter you need?

    I’ve been frustrated for an hour or so using the format parameter which didn’t work for me. A couple of extra date examples in the documentation would be great wouldn’t it.

    I have a custom field populated with JQuery date picker. In the database, I’m seeing wp_postmeta.meta_value having 20180806 stored as longtext for today’s date. My custom field is called dat and I’ve used [field dat date_format=’D j M Y’] on the page which is displaying Mon 6 Aug 2018.

    Hope that helps,

    David

    Thread Starter Christopher Mitchell

    (@chrismitchell)

    I found a solution in the end by building myself a shortcode with all the bits I needed 🙂 sorry 🙂

    David

    (@topsquirrel)

    Glad you found a solution 🙂

    @topsquirrel

    I have a custom field populated with JQuery date picker. In the database, I’m seeing wp_postmeta.meta_value having 20180806 stored as longtext for today’s date. My custom field is called dat and I’ve used [field dat date_format=’D j M Y’] on the page which is displaying Mon 6 Aug 2018.

    Thank you David! That was incredibly helpful.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom Date Format for ACF Date field’ is closed to new replies.