TD_DAY_OF_WEEK_COMPATIBLE_UDF

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

Definition

User-defined function (UDF) that processes the day of the week in a timestamp that belongs to. It has the same behavior as the DAYNUMBER_OF_WEEK( date, 'COMPATIBLE') function from Teradata.

PUBLIC.TD_DAY_OF_WEEK_COMPATIBLE_UDF(INPUT TIMESTAMP_TZ)

Parameters

INPUT TIMESTAMP_TZ

Date to get the day of the week from.

Returns

An integer between 1 and 7 where if January first is Wednesday then, 1 is equal to Wednesday, 2 is associated with Thursday, and so on.

Migration example

Input:

SELECT DAYNUMBER_OF_WEEK(CURRENT_DATE,'COMPATIBLE');

Output:

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

Last updated