PARSE_TIME_MILLIS

This page describes the PARSE_TIME_MILLIS function in Lenses SQL.

PARSE_TIME_MILLIS(millis, pattern)

Builds a time-millis value given a time string representation and a time pattern.

Available in:

Processors
SQL Studio

Sample code:

USE `kafka`;
SELECT 
    PARSE_TIME_MILLIS(tpep_pickup_datetime, 'yyyy-MM-dd HH:mm:ss'), 
    tpep_pickup_datetime 
FROM nyc-yellow-taxi-trip
LIMIT 1;

Output:

{
  "value": {
    "PARSE_TIME_MILLIS": "00:00:02",
    "tpep_pickup_datetime": "2016-01-01 00:00:02"
  }
}

Last updated

Logo

2024 © Lenses.io Ltd. Apache, Apache Kafka, Kafka and associated open source project names are trademarks of the Apache Software Foundation.