How to convert String from source connector to DateTime in Dataset. | Community
Skip to main content
July 6, 2023
Solved

How to convert String from source connector to DateTime in Dataset.

  • July 6, 2023
  • 1 reply
  • 1603 views

Need to convert the String attribute from source connector(Data landing zone) to Date time in AEP.

Tried to convert using below methods but either it is throwing an error or updating the empty values.

  • dformat
  • zone_date_to_utc
  • make_date_time
  • date
  • set_date_part
  • zone_date_to_zone
  • date_part

Please let us know is there any other process to perform it.

 

Eg: Source data(String-"20220607") Expected output(DateTime)

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 birthariya

The field name should not be quoted.

 

I would also try, just in case

 

date(trim(field_name), 'yyyyMMdd')

 

 

1 reply

Level 3
July 6, 2023

Hey,

I tried with the below and got the result, 

date('20220607', 'yyyyMMdd')

 

Adobe Employee
July 6, 2023

Hi @birthariya ,

 

Thanks for looking into the issue. Tried the above method still it return null values. PFA screenshot.

 

Thanks,

Vishnu K.

birthariyaAccepted solution
Level 3
July 6, 2023

The field name should not be quoted.

 

I would also try, just in case

 

date(trim(field_name), 'yyyyMMdd')