Apache Pinot Docs
Search…
latest
Configuration Reference
FromDateTime
This section contains reference documentation for the FromDateTime function.
Converts a formatted date-time string to milliseconds, based on the provided Joda-Time pattern.

Signature

FromDateTime(dateTimeString, pattern)

Usage Examples

1
SELECT FromDateTime('2019-08-07', 'yyyy-MM-dd') AS epochMillis
2
FROM ignoreMe
Copied!
epochMillis
1565136000000
1
SELECT FromDateTime(
2
'2019-08-07 3:12:13 PM',
3
'yyyy-MM-dd hh:mm:ss a'
4
) AS epochMillis
5
FROM ignoreMe
Copied!
epochMillis
1565190733000
1
SELECT FromDateTime(
2
'2019-08-07T15:12:13',
3
'yyyy-MM-dd''T''HH:mm:ss'
4
) AS epochMillis
5
FROM ignoreMe
Copied!
epochMillis
1565190733000
1
SELECT FromDateTime(
2
'2019-08-07T07:12:13-0800',
3
'yyyy-MM-dd''T''HH:mm:ssZ'
4
) AS epochMillis
5
FROM ignoreMe
Copied!
epochMillis
1565190733000
Last modified 2mo ago
Copy link