TIMESTAMP_DIFFERENCE_UDF
This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.
Definition
UDF That reproduces DATETIME Subtraction
PUBLIC.TIMESTAMP_DIFFERENCE_UDF
(MINUEND TIMESTAMP, SUBTRAHEND TIMESTAMP, INPUT_PART VARCHAR)Parameters
MINUEND TIMSTAMP
Date subtracted from.
SUBTRAHEND TIMESTAMP
Date subtracted.
INPUT_PART VARCHAR
Parts to be returned.
Returns
Formatted string value according to the INPUT_PART parameter.
Example
Input
select (timestampColumn1 - timestampColumn2 YEAR) from tableName;Output:
SELECT
(
--** MSC-WARNING - MSCEWI1020 - CUSTOM UDF 'TIMESTAMP_DIFFERENCE_UDF' INSERTED. **
PUBLIC.TIMESTAMP_DIFFERENCE_UDF(timestampColumn1, timestampColumn2, 'YEAR')) from
tableName;Last updated
