TO_DATE
This page describes the TO_DATE function in Lenses SQL.
TO_DATE(strExpr, pattern)
Converts a string representation of a date into epoch value using the pattern provided.
Available in:
Sample code:
USE `kafka`;
SELECT
TO_DATE(tpep_dropoff_datetime, 'yyyy-MM-dd HH:mm:ss'),
tpep_dropoff_datetime
FROM nyc-yellow-taxi-trip
LIMIT 1;
Output:
{
"value": {
"TO_DATE": "2016-01-01T00:00:00Z",
"tpep_dropoff_datetime": "2016-01-01 00:11:14"
}
}