Expand my Community achievements bar.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

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

Avatar

Level 1

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)

1 Accepted Solution

Avatar

Correct answer by
Level 3

The field name should not be quoted.

 

I would also try, just in case

 

date(trim(field_name), 'yyyyMMdd')

 

 

View solution in original post

4 Replies

Avatar

Level 3

Hey,

I tried with the below and got the result, 

date('20220607', 'yyyyMMdd')

 

Screen Shot 2023-07-06 at 10.32.09 AM.png

Avatar

Employee

Hi @birthariyamayank ,

 

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

 

Thanks,

Vishnu K.conversion.png

Avatar

Correct answer by
Level 3

The field name should not be quoted.

 

I would also try, just in case

 

date(trim(field_name), 'yyyyMMdd')

 

 

Avatar

Level 1

Thanks for looking this up further. But still get null values.

 

From Source column name is "Date Time". Tried both the methods nothing worked.

 

e.g: date(trim(Date_Time), 'yyyyMMdd')

       date(trim(DateTime), 'yyyyMMdd')

       Datetime.png