EXTRACT_TIMESTAMP_DIFFERENCE_UDF
This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.
Definition
Extracts 'Data Part' from the result of the subtraction MINUEND
- SUBTRAHEND
PUBLIC.EXTRACT_TIMESTAMP_DIFFERENCE_UDF
(MINUEND TIMESTAMP, SUBTRAHEND TIMESTAMP, INPUT_PART VARCHAR, EXTRACT_PART VARCHAR)
Parameters
MINUEND
TIMESTAMP
Date subtracted from.
SUBTRAHEND
TIMESTAMP
Date subtracted.
INPUT_PART
VARCHAR
Parts to be returned.
EXTRACT_PART
VARCHAR
Extract numeric value extracted from the interval.
Returns
The number of requests part of the extract.
Example
Input:
select extract(day from (timestampColumn1 - timestampColumn2 day to hour)) from tableName;
Output:
SELECT
--** MSC-WARNING - MSCEWI1020 - CUSTOM UDF 'EXTRACT_TIMESTAMP_DIFFERENCE_UDF' INSERTED. **
EXTRACT_TIMESTAMP_DIFFERENCE_UDF(
--** MSC-WARNING - MSCEWI1020 - CUSTOM UDF 'TIMESTAMP_DIFFERENCE_UDF' INSERTED. **
timestampColumn1, timestampColumn2, 'DAY TO HOUR', 'DAY')
from
tableName;
Last updated