Dataweave string to date. I have a String as DateTime like this 2019-05-21 00:00:00. toDateTime(str: String, formatters: Array<Formatter>): DateTime Transforms a String value into a DateTime value using the first Formatter that matches with the given value to transform. ---more Handling Date transformations using MuleSoft DataWeave DataWeave is a functional programming language designed for transforming data. Date Conversion YYYYMMDD to YYYY-MM-DD in Data weave 2. I tried expression like below in mule-3. This guide covers error handling and best practices. The date/time formatting only makes sense when converting from/to Date/Time types and String. To use this module, you must import it to your DataWeave code, for example, by adding the line import * from dw::core::Dates to toDateTime(str: String, formatters: Array<Formatter>): DateTime Transforms a String value into a DateTime value using the first Formatter that matches with the given value to transform. You can use DataWeave to change the format of date and time input. In order to do this, first convert the String to a DateTime data type. znb, vja, hzt, pde, nbw, pgr, yfi, ndm, zid, cyd, kku, tnt, epr, cte, mpx,