CAST_TIMESTAMP_TZ_TO_NUMERIC_UDF (TIMESTAMP_TZ)
Definition
This user-defined function (UDF) is used to cast timestamp_tz to numeric. It converts the current timezone to UTC because the numeric value cannot save the timestamp information.
CAST_TIMESTAMP_TZ_TO_NUMERIC_UDF(INPUT TIMESTAMP_TZ)Parameters
INPUT TIMESTAMP_TZ
The timestamp input that is going to be cast.
Returns
Returns a numeric with a decimal point. The integer part represents the number of days from 1900-01-01 and the decimal part is the percentage of milliseconds in 24 hours.
Usage example
Input:
SELECT PUBLIC.CAST_TIMESTAMP_TZ_TO_NUMERIC_UDF('1900-01-01 01:00:00.000 +0100')Output:
0Last updated
