DATEDIFF_UDF(TIMESTAMP, TIMESTAMP)
Definition
This user-defined function (UDF) subtracts a timestamp from another timestamp.
PUBLIC.DATEDIFF_UDF(FIRST_PARAM TIMESTAMP, SECOND_PARAM TIMESTAMP)Parameters
FIRST_PARAM TIMESTAMP
The timestamp that represents the minuend.
SECOND_PARAM TIMESTAMP
The timestamp that represents the subtrahend.
Returns
Returns an integer with the difference of days between the first and the second timestamps.
Usage example
Input:
SELECT PUBLIC.DATEDIFF_UDF('2024-01-26 22:00:50.708 -0800','2023-01-26 22:00:50.708 -0800');Output:
365Last updated
