Skip to main content
Scalar function
Any NULL component yields NULL. Non-finite seconds and out-of-range components raise an error.

Syntax

Scalar

Arguments

Returns

  • Type: TIME with microsecond precision
  • NULL behavior: Any NULL component yields NULL. Non-finite seconds and out-of-range components raise an error.

Properties

Usage notes

  • Fractional seconds round to the nearest microsecond.
  • Hour/minute are converted to INTEGER; second retains a DOUBLE fractional component.
  • A sub-60 second value rounding to 60 seconds is clamped to 59.999999 seconds.
  • INTEGER and INT mean the same type; STRING means VARCHAR text. NULL can be used with a supported type. Cast NULL explicitly when its type would otherwise be unclear.

Examples

Basic example

Midnight and fractional seconds

Last modified on October 15, 2026