I am trying to convert a string from payload to format dd/mm/yyyy
Here is the string from payload:
Mar 9, 2016 04:19:33 PM
My Dataweave conversion:
timestamp: payload.metas.datas[0].timestamp as :datetime {format: "MMM d, yyyy hh:mm:ss a"}
I am getting the following error:
Cannot coerce a :string to a :datetime, caused by :Text 'Mar 9, 2016 04:19:33 PM' could not be parsed: Unable to obtain ZonedDateTime from TemporalAccessor: DateTimeBuilder[, ISO, null, 2016-03-09, 16:19:33], type org.threeten.bp.format.DateTimeBuilder.
Can anyone advise how this should be done ?
Thanks a lot. Mike