Expandir minha barra de realizações na Comunidade.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.
SOLUCIONADO

displaying a datetime field in AJO

Avatar

Level 2

Hi

 

So..... i have a column in the data schema called eventDate, it is string, date-time format in the standard format (ie 

2025-01-13T16:15:00Z) - In an AJO email I'd like to display this as both the date in the format 13-01-2025 and the time as 16:15
 
for the life of me I cant figure out the converting and formatting. any ideas?
Tópicos

Os tópicos ajudam a categorizar o conteúdo da comunidade e aumentam sua capacidade de descobrir conteúdo relevante.

1 Solução aceita

Avatar

Resposta correta de
Community Advisor

@MarcSt4 


  {%= formatDate(stringToDate(eventDate), "dd-MM-YYYY") %}
  {%= formatDate(stringToDate(eventDate), "HH:mm") %}

 

Thanks,

David



David Kangni

Ver solução na publicação original

2 Respostas

Avatar

Resposta correta de
Community Advisor

@MarcSt4 


  {%= formatDate(stringToDate(eventDate), "dd-MM-YYYY") %}
  {%= formatDate(stringToDate(eventDate), "HH:mm") %}

 

Thanks,

David



David Kangni

Avatar

Level 2

too easy 2 things has my measure, one was that I dont understand shy we need to convert string to date when the field is already a string with datetime format, but guess thats just the way it is.

 

the other thing that was causing issues, is that when using an event in AJO, referencing the date in the event, for some reason you need to put the event id in ''. Oh well, live and learn