description |
This section contains reference documentation for the FromDateTime function. |
Converts a formatted date-time string to milliseconds, based on the provided Joda-Time pattern.
FromDateTime(dateTimeString, pattern)
SELECT FromDateTime('2019-08-07', 'yyyy-MM-dd') AS epochMillis
FROM ignoreMe
epochMillis |
1565136000000 |
SELECT FromDateTime(
'2019-08-07 3:12:13 PM',
'yyyy-MM-dd hh:mm:ss a'
) AS epochMillis
FROM ignoreMe
epochMillis |
1565190733000 |
SELECT FromDateTime(
'2019-08-07T15:12:13',
'yyyy-MM-dd''T''HH:mm:ss'
) AS epochMillis
FROM ignoreMe
epochMillis |
1565190733000 |
SELECT FromDateTime(
'2019-08-07T07:12:13-0800',
'yyyy-MM-dd''T''HH:mm:ssZ'
) AS epochMillis
FROM ignoreMe
epochMillis |
1565190733000 |