How to convert date format in Dataweave 2.0 Mule 4

Converting date format in Dataweave 2.0 using LocalDateTime, DateTime. See more date time conversion examples here

Converting Date using Dataweave 2.0 Mule 4:



%dw 2.0
var dateval = "Jul 24, 2020 10:35:01 AM"
output application/json
---
dateval as LocalDateTime {
        format: "MMM d, yyyy h:m:s a"
    } as
DateTime {
    format:"yyyy-M-d'T'hh:mm:ss.SSS'Z'"
}




Post a Comment

0 Comments