Manvitha
Manvitha

Reputation: 21

Conversion of date from '1 January 1970 00:00:00.000' to 'yyyy-MM-dd'T'HH:mm:ssZ' format in Mule4

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

Answers (1)

Salim Khan
Salim Khan

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

Related Questions