DATE_TO_INT_UDF

This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.

Definition

UDF that reproduces Teradata's DATE-TO-NUMERIC functionality.

PUBLIC.DATE_TO_INT_UDF(DATE_TO_CONVERT DATE)

Parameters

DATE_TO_CONVERT DATE

The date is to be converted to an integer.

Returns

Returns the date in numeric values.

Example

Input:

SELECT mod(date '2015-11-26', 5890), sin(current_date);

Output:

SELECT
mod(PUBLIC.DATE_TO_INT_UDF(date '2015-11-26') /*** MSC-WARNING - MSCEWI1020 - CUSTOM UDF 'DATE_TO_INT_UDF' INSERTED. ***/, 5890),
sin(PUBLIC.DATE_TO_INT_UDF(CURRENT_DATE()) /*** MSC-WARNING - MSCEWI1020 - CUSTOM UDF 'DATE_TO_INT_UDF' INSERTED. ***/);

Last updated