TD_DAY_OF_CALENDAR_UDF

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

Definition

User-defined function (UDF) that reproduces the functionality of Teradata's TO_DAY_OF_CALENDAR

PUBLIC.TD_DAY_OF_CALENDAR_UDF(INPUT TIMESTAMP_TZ)

Parameters

INPUT TIMESTAMP_TZ

Date to which the number of days since 1900-01-01 will be counted.

Returns

An integer that represents the number of days elapsed from 1900-01-01 to INPUT

Migration example

Input:

SELECT td_day_of_calendar(current_date)

Output:

SELECT
PUBLIC.TD_DAY_OF_CALENDAR_UDF(CURRENT_DATE()) /*** MSC-WARNING - MSCEWI1020 - CUSTOM UDF 'TD_DAY_OF_CALENDAR_UDF' INSERTED. ***/;

Last updated