Expand my Community achievements bar.

SOLVED

Data prep function

Avatar

Level 3

Hi team,
Their is any function to convert mentioned datetime value e.g. Sep 25 2023 3:06pm into AEP recommended datetime format like YYYY-MM-DDThh:MM:ss+00:00.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @sandip_surse - In that case just use a data prep function and map it to your target attribute in dataset.

date( D_Datetime,"MMM dd yyyy h:mma")

Where D_Datetime is the field in the source csv.

 

View solution in original post

6 Replies

Avatar

Community Advisor

Hi @sandip_surse -"25 2023 3:06pm" Whats the value of month in the date you mentioned?

Avatar

Community Advisor

Hi @sandip_surse - Here is the solution

 

date("Sep 25 2013 3:06pm","MMM dd yyyy h:mma")

arpan_garg_0-1696316168115.png

Thanks,

Arpan

Avatar

Level 3

Thanks I agree but in case we have these records in once specific attribute then how can we use above function.
like in below one CSV file
 G_Id            D_Datetime 

 5478        Sep 25 2013 3:06pm

7896         Aug 25 2022 5:05pm

 

how can we ingest above D_datetime value in AEP...

As per my knowledge AEP can accept only below format  'YYYY-MM-DDThh:MM:ss+00:00'

Avatar

Correct answer by
Community Advisor

Hi @sandip_surse - In that case just use a data prep function and map it to your target attribute in dataset.

date( D_Datetime,"MMM dd yyyy h:mma")

Where D_Datetime is the field in the source csv.

 

Avatar

Level 3

Yes I already tried but it doesn't work might be I doing something wrong previously but after I checking again it will work..

Thank You!