FORMAT_TIMESTAMP
This page describes the FORMAT_TIMESTAMP function in Lenses SQL.
FORMAT_TIMESTAMP(timestamp,output_pattern)
Returns a string representation of a timestamp value according to a given pattern.
Available in:
Sample code:
USE `kafka`;
SELECT
FORMAT_TIMESTAMP(_meta.timestamp,'yyyy-MM-dd HH:mm:ss'),
_meta.timestamp
FROM sea-vessel-position-reports
LIMIT 1;
Output:
{
"value": {
"FORMAT_TIMESTAMP": "2023-11-28 20:28:45",
"timestamp": "2023-11-28T20:28:45.337Z"
}
}