Mautic Community Forums

{contactfield=XYZ} of type date always formats Y-M-D

Your software
My Mautic version is: 2.15.3
My PHP version is: 7.2

Your problem
My problem is:

Date Fields as tokens always are formated Y-M-D in emails, no matter what is set in backend. In fact Y-M-D isn’t even set for any of the date formatings. It would be important to adjust the Date / Time and probably other tokens formating in the right locale.

Did I miss any possible setting or is this a real limitation as of today?

These errors are showing in the log: none

Steps I have tried to fix the problem: experimented with different settings

According to this PR: https://github.com/mautic/mautic/pull/6237 you should be able to use the following syntax:

{contactfield=aliasofyourcustomdatefield|datetime}
{contactfield=aliasofyourcustomdatefield|date}
{contactfield=aliasofyourcustomdatefield|time}

Assuming of course you have the desired formatting in your global config (see screenshot below)

2 Likes

See also, date format section on https://www.mautic.org/docs/en/emails/manage_emails.html :slight_smile:

1 Like