query regarding datetime datatype field | Community
Skip to main content
January 9, 2024
Solved

query regarding datetime datatype field

  • January 9, 2024
  • 2 replies
  • 2052 views

Hi,

I have been trying to ingest data in field which is datetime datatype.Below is my query around it.

 

If we have a field which is of datetime datatype. So is there any standard format in which we have to ingest this field's data.

 

Additionally is it mandate to convert this fields data to UTC timezone.By default in which timezone this data is.

 

Thanks 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by brekrut

can you provide the format of the field which you are attempting to map the string value into?

 

The date function will convert a date string into a ZonedDateTime object (ISO 8601 format).

 

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

2 replies

abhinavbalooni
Community Advisor
Community Advisor
January 9, 2024

Hey @shaini_gupta 

 

A similar query has already been addressed a few months back. Have a look here: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-platform/source-date-transformation-to-timestamp/td-p/594282

 

If you still have doubts after reading the above solution, feel free to put in your query on this thread.

 

Cheers,

Abhinav

January 10, 2024

Hi @abhinavbalooni ,

Thanks for quick turnaround.

I have additional query on this we have data coming external source in which we have dob coming as "17-12-1974" however client is expecting as to do transformation and show person.birthDate in AEP as date(dob, "MM/dd/yyyy") so I tried this however this transformation is not showing any result in preview mode.

As a work around I tried with "format(date(dob), "MM/dd/yyyy")" and we getting desired formatting however when I map this to person.birthDate(date column) its not showing any result however its working fine when we map it to any string column.Can you please help me with this.

Additionally any recommendation on this is it mandatory that to change datetime columns to UTC time zone.

Thanks

brekrut
Adobe Employee
brekrutAdobe EmployeeAccepted solution
Adobe Employee
January 10, 2024

can you provide the format of the field which you are attempting to map the string value into?

 

The date function will convert a date string into a ZonedDateTime object (ISO 8601 format).

 

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

NimashaJain
Adobe Employee
Adobe Employee
January 15, 2024

@shaini_gupta Did you find the suggested solutions helpful? It would be great if you can  mark the answer as correct for posterity. If you have found out solution yourself, share it with wider audience in the community.