Reputation: 11
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
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