%dw 2.0
import * from dw::util::Coercions
output application/dw
---
{
  a: toLocalDateTime("2015-10-01T23:57:59"),
  b: toLocalDateTime("2003-10-01 23:57:59","uuuu-MM-dd HH:mm:ss")
}
toLocalDateTime
toLocalDateTime(str: String, format: String | Null = null, locale: String | Null = null): LocalDateTime
Transforms a String value into a LocalDateTime value
and accepts a format and locale.
Introduced in DataWeave version 2.4.0.
Parameters
| Name | Description | 
|---|---|
  | 
The   | 
  | 
The formatting to use on the   | 
  | 
Optional ISO 3166 country code to use, such as   | 
Example
This example shows how toLocalDateTime behaves with different inputs.
It produces output in the application/dw format.



