unix_micros function

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime

Returns the number of microseconds since 1970-01-01 00:00:00 UTC.

Syntax

unix_micros(expr)

Arguments

  • expr: A TIMESTAMP expression.

Returns

A BIGINT.

Examples

> SELECT unix_micros(TIMESTAMP('1970-01-01 00:00:01Z'));
 1000000