Maddy
Maddy

Reputation: 11

Mule4 time format

I am facing issue while doing string to time conversion in DataWeave2.0.

I am having string as "1800", my requirement is to convert it into time in HH:MM:SS format. I tried going through Mule docs on DateTime, Time but not able to convert string to Time in required format.

Upvotes: 0

Views: 970

Answers (1)

Shoki
Shoki

Reputation: 1538

Since it doesn't have a time zone it's a LocalTime so you can try:

"1800" as LocalTime {format: "HHmm"} as String {format: "HH:mm:ss"}

Upvotes: 2

Related Questions