Expand my Community achievements bar.

Adobe Journey Optimizer Community Lens 6th edition is out.

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

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

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") %}