Display date in yyyy/mm/dd format | Community
Skip to main content
Level 2
Jun 18, 2019 10:45 AM UTC
Solved

Display date in yyyy/mm/dd format

Hi, we have a field in our table that we want to display in the yyyy/mm/dd format in the email. Can anyone please guide me the right syntax to display the field value in this format please. Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Jean-Serge_Biro
Jean-Serge_BiroAccepted solution
Level 10
Jun 18, 2019 11:39 AM UTC

Hi Yash,

Please use the formatDate API function in the Html source tab, and put your Javascript personalisation, such as <% formatDate(yourTargetDataFielddate, "%4Y/%2M/%2D") %>

http://docs.campaign.adobe.com/doc/AC/en/jsapi/f-formatDate.html?hl=formatdate

Regards
J-Serge

2 replies

YashP1Author
Level 2
Jun 20, 2019 8:48 AM UTC

Thanks so much for your response J-Serge! It worked!!

Translate
Jean-Serge_Biro
Jean-Serge_BiroAccepted solution
Level 10
Jun 18, 2019 11:39 AM UTC

Hi Yash,

Please use the formatDate API function in the Html source tab, and put your Javascript personalisation, such as <% formatDate(yourTargetDataFielddate, "%4Y/%2M/%2D") %>

http://docs.campaign.adobe.com/doc/AC/en/jsapi/f-formatDate.html?hl=formatdate

Regards
J-Serge

Translate