Skip to main content
Yashwanth K 님이 #MuleSoft DataWeave에 질문했습니다

I saw some question but the solution which was given for that doesn't work. 

Payload:

{

"created_date_time": "2021-04-05 15:12:31.000"

 }

 

@Manish Yadav​  @Abhishek Bathwal​ @Tirthankar Kundu​ 

답변 5개
  1. 2021년 5월 17일 오전 9:24

    Hey,

     

    Do you have sample input for different time zone with expected time in Unix, Please provide me it will help me to understand your use case more.

    As Please refer below DataWeave As initially I have read it as LocalDateTime then convert it to DateTime

    %dw 2.0

    output application/json

    ---

    {

    "created_date_time": ((("2021-04-05 15:12:31.000" as LocalDateTime {format: "yyyy-MM-dd HH:mm:ss.SSS"}) as DateTime) as Number {unit: "milliseconds"}) / 1000

    }

    Please let me know if above solution worked or not?

    Regards,

    Shekh

0/9000