epoch_us
Extract the epoch component in microseconds from a temporal type.
Try an expression
In Formula, enter the expression and set Output type to BIGINT.
Expression
epoch_us(TIMESTAMP '2021-08-03 11:59:44.123456')Result
1627991984123456To use your own data, replace the example values with column names. Keep format strings and other options as written.
Arguments and types
epoch_us(temporal)- temporal
- Date, Interval, Time, Timestamp
Supported signatures (7)
epoch_us(temporal: DATE) → BIGINT
epoch_us(temporal: INTERVAL) → BIGINT
epoch_us(temporal: TIME WITH TIME ZONE) → BIGINT
epoch_us(temporal: TIME) → BIGINT
epoch_us(temporal: TIMESTAMP WITH TIME ZONE) → BIGINT
epoch_us(temporal: TIMESTAMP) → BIGINT
epoch_us(temporal: TIME_NS) → BIGINTThe result type can depend on the input types. See DuckDB for the full argument rules.
Things to know
If the first argument is missing, the result is NULL.
Function metadata from DuckDB, used under the MIT license.