Change Date Fromat | Community
Skip to main content
Level 4
June 13, 2024
Solved

Change Date Fromat

  • June 13, 2024
  • 1 reply
  • 1157 views

Hi @satheeskannak  @mohan_dugganab @ivanmi1 

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

Best answer by Mohan_Dugganab

Hi @mohan_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 

 

 

 

 


Can you try it on the following lines 

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

1 reply

Mohan_Dugganab
Adobe Employee
Adobe Employee
June 13, 2024
Level 4
June 13, 2024

Hi @mohan_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 

Mohan_Dugganab
Adobe Employee
Adobe Employee
June 13, 2024

Here is an example 

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