I get a CSV file with data that I transform to application/java.
One of the fields (Creation_Date) is a DateTime field that I get as String because the output field is a string type.
Input field: Creation_Date (String) - Example: 2019-03-02 07:00:00.000
Output field: CreatedDate (String) - Example: 2019-03-02 08:00:00.000
I use that code in my Dataweave 2.0 transformation because I want to add one hour more to the input datetime:
CreatedDate: payload.Creation_date as LocalDateFormat {format: "yyyy-MM-dd HH:mm:ss+01:00"}
But it returns an error:
Cannot coerce a String to a Localdatetime, caused by CreatedDate