TD_WEEK_OF_CALENDAR_UDF

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

Definition

User-defined function (UDF) works as equivalent to Teradata's TD_WEEK_OF_CALENDAR function.

PUBLIC.TD_WEEK_OF_CALENDAR_UDF(INPUT TIMESTAMP_TZ)

Parameters

INPUT TIMESTAMP_TZ

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

Returns

An integer that represents the number of weeks elapsed from 1900-01-01 to the input specified

Migration example

Input:

IN -> Teradata_01.sql
SELECT TD_WEEK_OF_CALENDAR(DATE '2023-11-30')

Output:

OUT -> Teradata_01.sql
SELECT
PUBLIC.TD_WEEK_OF_CALENDAR_UDF(DATE '2023-11-30');

Last updated