FORMAT_TIME
This page describes the FORMAT_TIME function in Lenses SQL.
FORMAT_TIME(time, output_pattern)
Returns a string representation of a time value according to a given pattern.
Available in:
Sample code:
USE `kafka`;
SELECT
FORMAT_TIME(_meta.timestamp,'K:mm a, z'),
_meta.timestamp
FROM nyc-yellow-taxi-trip
LIMIT 1;
Output:
{
"value": {
"FORMAT_TIME": "8:28 PM, UTC",
"timestamp": "2023-11-28T20:28:45.41Z"
}
}