Dates & time
Scalar
epoch_us()
Extract the epoch component in microseconds from a temporal type
Reference: DuckDB 2.0.0
Arguments & returns
7 overloadsepoch_us(temporal)
Scalar
Example
Haybarn WASM 2.0.0-rc12 ยท In your browser
Engine example ยท Run to view results.
In other engines
BigQueryunix_micros()
SELECT UNIX_MICROS('2008-12-25 15:30:00+00')
SELECT EPOCH_US(CAST('2008-12-25 15:30:00+00' AS TIMESTAMPTZ))
Snowflake
SELECT EXTRACT(EPOCH_MICROSECOND FROM CAST('2026-01-06 11:45:00' AS TIMESTAMP_NTZ))
SELECT EPOCH_US(CAST('2026-01-06 11:45:00' AS TIMESTAMP))