SUBTRACT_TIMESTAMP_TZ_UDF (TIMESTAMP_TZ, TIMESTAMP_TZ)
Definition
This user-defined function (UDF) converts both inputs to the system session timezone and subtracts the dates (FIRST_DATE
- SECOND_DATE
) taking 1900-01-01 00:00:00.000 as the zero value. If any value does not include the timezone, the current session timezone is used.
Parameters
FIRST_DATE
TIMESTAMP_TZ
The first date to be subtracted from.
SECOND_DATE
TIMESTAMP_TZ
The second date to be subtracted to.
Returns
Returns the difference between the two input dates.
Usage example
Input:
Output:
Last updated