time_to_millis function

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime 18.3 and above

Returns the number of milliseconds since midnight for a TIME value.

Syntax

time_to_millis(expr)

Arguments

  • expr: A TIME expression.

Returns

A BIGINT.

Examples

> SELECT time_to_millis(TIME'14:30:00.5');
  52200500

> SELECT time_to_millis(TIME'00:00:00');
  0