Scalar function
NULL value/unit yields NULL.
Syntax
Scalar
- Use TIMESTAMP with microsecond precision. TIMESTAMP values with nanosecond precision can raise a type error.
Date (scalar)
- With E6 type conversion enabled, DATE input is first converted to TIMESTAMP. The result is DATE.
- Use DATE or TIMESTAMP with microsecond precision. TIMESTAMP literals with nanosecond precision currently raise a type error.
Arguments
Scalar
Date
Returns
- Type: DATE
- NULL behavior: NULL value/unit yields NULL.
Properties
Usage notes
- Truncates the timestamp to the requested unit, then returns its date.
Examples
- DATE input requires E6 type conversion to be enabled.
Truncate to the start of a year
Limitations
- The result is DATE, even when query tools report TIMESTAMP. The returned value is not automatically converted to the reported type.
- Numeric TRUNC from other libraries is not an alias of this temporal form.
- TIMESTAMP literals with nanosecond precision currently raise a type error. Use the DATE form shown in the example or a supported microsecond TIMESTAMP.
Last modified on October 15, 2026