Skip to main content
Level 2
Dec 17, 2024 8:38 PM UTC
Solved

Formatting a Date Time Field in AJO

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
DavidKangni
DavidKangniAccepted solution
Adobe Champion and Community Advisor
Dec 18, 2024 3:55 PM UTC

@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

6 replies

Mohan_Dugganab
Adobe Employee
Adobe Employee
Dec 18, 2024 4:01 AM UTC

Can you try it on the following line 

{%= formatDate(toDateTimeOnly("2024-12-12T16:20:57.924Z"), "YYYY.MM.dd HH:mm:ss") %}
Translate
DanSpigs1Author
Level 2
Dec 18, 2024 2:27 PM UTC

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

Translate
Mohan_Dugganab
Adobe Employee
Adobe Employee
Dec 18, 2024 4:18 PM UTC

This will be in the message content as a personalization component

Translate
DavidKangni
Adobe Champion and Community Advisor
DavidKangniAdobe Champion and Community AdvisorAccepted solution
Adobe Champion and Community Advisor
Dec 18, 2024 3:55 PM UTC

@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

Translate
David Kangni