We have a requirement wherein we have to convert the date obtained in number format to String format using data weave 2.0.
Below is the snippet of input date that we receive, want to perform transformations on that value.
We have a requirement wherein we have to convert the date obtained in number format to String format using data weave 2.0.
Below is the snippet of input date that we receive, want to perform transformations on that value.
Example what you provided has invalid JSON. All string values should be in double quotes. Here is example how you can produce valid JSON from the date value.
now() as String {format: "yyyy-MM-dd_HH_mm_ss"}
https://simpleflatservice.com/mule4/Date_format.html
Format works in both ways - to produce string value from date or parse string value to a date. But, in both cases string in the JSON should be in quotes.