Scalar function
NULL timestamp yields NULL. NULL or invalid timezone raises an error.
Syntax
Scalar
Arguments
Returns
- Type: TIMESTAMP with the specified constant time zone; UTC by default
- NULL behavior: NULL timestamp yields NULL. NULL or invalid timezone raises an error.
Properties
Usage notes
- DATETIME takes a TIMESTAMP and an optional STRING time zone.
- Use the argument combinations in Syntax. Separate date/time components and numeric epoch overloads are outside these forms.
Examples
Basic example
Keep a timestamp in UTC
Limitations
- A constant time-zone argument sets the result’s time zone. For example, UTC produces a TIMESTAMP with microsecond precision and the UTC time zone.
Last modified on October 15, 2026