DIFFTTIME_PERIOD_UDF
This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.
Definition
Calculates the difference between two dates depending on the time parameter.
PUBLIC.DIFFTTIME_PERIOD_UDF(TIME STRING, PERIOD VARCHAR(50))
Parameters
TIME
STRING
The time to be used in the anchor.
PERIOD
VARCHAR
The period column that is used in the expand on.
Returns
A number that represents the difference between two dates.
Usage example
Input:
SELECT DIFFTTIME_PERIOD_UDF('SECONDS','2022-11-26 10:15:20.000*2022-11-26 10:15:25.000');
Output:
5
Last updated