Expand my Community achievements bar.

Dive in, experiment, and see how our AI Assistant Content Accelerator can transform your workflows with personalized, efficient content solutions through our newly designed playground experience.
SOLVED

Change Date Fromat

Avatar

Level 4

Hi @SatheeskannaK  @dugganab @Ivan_Mironchuk 

Have one doubt that is it possible can we change the Date format in the Email Templete for the Date.It is comming like this DD:MM:YY but i want to show this like MM:DD:YY Is this passible in AJO with any Helper function. If Yes Please Let Me know how it can be done?

Thanks

1 Accepted Solution

Avatar

Correct answer by
Employee

Can you try it on the following lines 

{% let a = context.journey.events.`815461771`.commerce.order.cancelDate %}
{%= formatDate(toDateTimeOnly(a), "EEEE, LLLL dd, YYYY") %}

View solution in original post

5 Replies

Avatar

Level 4

Hi @dugganab 
i want the date format to be converted in this fromat  el [day of the week] [day] de [month] de [year] eg : Sunday, September 7, 2014 
can we do this in AJO email template 
if possible can you share some example 

Thanks 

Avatar

Employee

Here is an example 

{% let d=now %}
{%= formatDate(d, "EEEE, LLLL dd, YYYY") %}

Avatar

Level 4

Hi @dugganab 
the above one is working 
but i need to get the value from the contextual attribute and if i remove ` from the number error is coming in with and without 

 

 

 

 

MicrosoftTeams-image (7).pngMicrosoftTeams-image (8).png

Avatar

Correct answer by
Employee

Can you try it on the following lines 

{% let a = context.journey.events.`815461771`.commerce.order.cancelDate %}
{%= formatDate(toDateTimeOnly(a), "EEEE, LLLL dd, YYYY") %}