TRUNC_UDF (TIMESTAMP_LTZ)
Definition
This user-defined function (UDF) reproduces the Teradata and Oracle TRUNC(Date) functionality when the format parameter is not specified.
Parameters
DATE_TO_TRUNC
TIMESTAMP_LTZ
A timestamp_ltz
value to truncate which must be a date, timestamp, or timestamp with timezone.
Returns
Returns a date part of DATE_TO_TRUNC
.
Usage example
Input:
Output:
Last updated