Dates & time
Scalar
epoch_ms()
Extract the epoch component in milliseconds from a temporal type
Reference: DuckDB 2.0.0
Arguments & returns
8 overloadsepoch_ms(temporal)
Scalar
Example
Haybarn WASM 2.0.0-rc12 ยท In your browser
Engine example ยท Run to view results.
In other engines
BigQueryunix_millis()
SELECT UNIX_MILLIS('2008-12-25 15:30:00+00')
SELECT EPOCH_MS(CAST('2008-12-25 15:30:00+00' AS TIMESTAMPTZ))
Snowflakedate_part()
SELECT DATE_PART(epoch_milliseconds, foo) as ddate from table_name
SELECT EPOCH_MS(foo) AS ddate FROM table_name