Scalar function
Returns NULL for NULL input. Non-finite numeric values or arithmetic overflow raise an error.
Syntax
Scalar
Arguments
Returns
- Type: TIMESTAMP with UTC timezone
- Possible values: UTC instants representable as signed 64-bit microseconds.
- NULL behavior: Returns NULL for NULL input. Non-finite numeric values or arithmetic overflow raise an error.
Properties
Units
- Input unit: milliseconds since Unix epoch UTC
- Output unit: UTC timestamp with microsecond precision
- Multiply by 1000 to obtain microseconds.
Usage notes
- Negative inputs represent instants before the Unix epoch.
- Conversion results must fit a signed 64-bit count of microseconds; overflow raises an error.
Examples
Unix epoch conversion
Limitations
- TIMESTAMP_MILLIS and TIMESTAMP_MICROS require integer inputs. FLOAT, DOUBLE, and DECIMAL inputs are not supported.
- Use INTEGER or BIGINT. Cast TINYINT and SMALLINT values to INTEGER before calling the function.
Last modified on October 15, 2026