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

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?
Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@MarcSt4 


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

 

Thanks,

David



David Kangni

View solution in original post

2 Replies

Avatar

Correct answer by
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