toDate
Converts a String to a date. For example, given a schema such as:
{
"type": "record",
"name": "events",
"fields": [
{ "name": "name", "type": "string" },
{ "name": "eventDate", "type" : "string"}
]
}
and a record such as:
{
"name" : "My Event",
"eventDate" : "2017-10-20T00:00:00Z"
}
The following record path would parse the eventDate field into a Date:
toDate( /eventDate, "yyyy-MM-dd'T'HH:mm:ss'Z'")
toDate( /eventDate, "yyyy-MM-dd'T'HH:mm:ss'Z'", "GMT+8:00")