Home Forums Front-end Issues Date Field Output


Date Field Output

  • Hi, I created a date field. Display format I had d/m/Y and return Format had j n Y. Via GenerateBlocks Post meta I see output in YYYYMMDD format. How and where I can change this format on j n Y? Thanks for help.

  • what is GenerateBlocks?

    If that is expecting a date stored in the database then it will not work. ACF date fields are not stored as date columns in the database. They are stored as strings in the format that you are seeing “Ymd”.

    If what you are using does not call get_field() or some other ACF function then the format value you set for the field will have no effect on the value returned.

    Without using ACF functions or adding some type of code there isn’t a way to convert these to proper date values.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.