내 커뮤니티 업적 표시줄을 확대합니다.

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

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

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 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 3

The field name should not be quoted.

 

I would also try, just in case

 

date(trim(field_name), 'yyyyMMdd')

 

 

원본 게시물의 솔루션 보기

4 답변 개

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

정확한 답변 작성자:
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