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.

Formatting a Date Time Field in AJO

Avatar

Level 2

I have a file coming in for a daily load which has a date time field formatted YYYY.MM.DD HH:MM:SS.  Is there a way in AJO to format the field as it comes in so it can be read in.  Currently it reads as null and looking at the documentation it needs to be in one of the accepted formats, which this isn't.  I've tried several of the functions and it continues to be read as null.

 

Thanks

6 Replies

Avatar

Employee

Can you try it on the following line 

 {%= formatDate(toDateTimeOnly("2024-12-12T16:20:57.924Z"), "YYYY.MM.dd HH:mm:ss") %}

Avatar

Level 2

Thank you for your response.  Where would I be putting this code?  In the mapping during ingestion?

Avatar

Employee

This will be in the message content as a personalization component

Avatar

Level 2

Sorry for the confusion, the issue here is with data ingestion, not with personalization.  I am trying to load data in currently through a workflow, but eventually through an automated load using the data landing zone.  Is there a similar function set up I can input when I map the fields?

Avatar

Community Advisor

@DanSpigs1  I replied yesterday.

 

AJO supports ISO or UTC only. You can use data prep functions during your mapping

 

https://experienceleague.adobe.com/en/docs/experience-platform/data-prep/functions#date-and-time

 

Your date is YYYY.MM.DD HH:MM:SS then you should use this formula

 

date(replacestr(your_date_field_name,".","-"))

 

Thanks,

David

 



David Kangni

Avatar

Community Advisor

@DanSpigs1 

 

AJO supports ISO or UTC only. You can use data prep functions during your mapping

 

https://experienceleague.adobe.com/en/docs/experience-platform/data-prep/functions#date-and-time

 

Thanks,

David



David Kangni