Using input payload of
{
"Date": "2025-09-09T18:03:06.830"
}
I'm trying to get an output of
"2025-09-09T18:03:06.830Z"
I've tried this DataWeave
%dw 2.0
output application/json
---
payload.Date as String {format: "yyyy-MM-dd'T'HH:mm:ss.SSSZ"}
But my output is coming back as
"2025-09-09T18:03:06.830"
Without the Z at the end of the milliseconds
I've also tried
%dw 2.0
output application/json
---
payload.Date as String {format: "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"}
With no luck
I can't seem to find as DateTime formatting that is helping me either. I've also found outputs with 2 milliseconds and a Z but not 3 (such as the basic payload.Date as DateTime output)