Reputation: 21
I have a requirement wherein I have to convert the date from format '1 January 1970 00:00:00.000' as '1970-01-01T00:00:00' in Mule4.
Upvotes: 0
Views: 284
Reputation: 4303
Try with this
%dw 2.0
output application/json
---
{
Result: "1 January 1970 00:00:00.000" as LocalDateTime {format: "d MMMM yyyy HH:mm:ss.SSS"} as DateTime {format: "yyyy-MM-dd'T'HH:mm:ss"}
}
Upvotes: 3