Function | Description |
td_day_of_week | Returns week day in number ranging from 1-7 for the specified date |
td_day_of_month | Returns Day of the Month for the specified date |
td_day_of_year | Returns Day of the year for the specified date |
td_day_of_calendar | Returns number of days elapsed from January 01, 1900 for the specified date |
td_weekday_of_month | Returns nth Week of the month ranging from 1-4 for the specified date |
td_week_of_month | Returns nth Week of the month ranging from 0-4 for the specified date |
td_week_of_year | Returns Week of the year in number ranging from 0-52 for the specified date |
td_week_of_calendar | Returns Number of weeks elapsed from January 01, 1900 for the specified date |
td_month_of_quarter | Returns nth Month of the quarter ranging from 1 to 3 for the specified date |
td_month_of_year | Returns nth Month of the year ranging from 1 to 12 for the specified date |
td_month_of_calendar | Returns Number of months elapsed from January 01, 1900 for the specified date |
td_quarter_of_year | Returns Quarter of the year ranging from 1 to 4 for the specified date |
td_quarter_of_calendar | Returns Number of quarters elapsed from January 01, 1900 for the specified date |
td_year_of_calendar | Returns Year for the specified date |
any_calendar_function(date/timestamp column)
Example 1: SELECT TD_DAY_OF_WEEK(CURRENT_DATE);
Output: 4
Example 1: SELECT TD_DAY_OF_MONTH(CURRENT_DATE);
Output: 17
Example 1: SELECT TD_DAY_OF_YEAR(CURRENT_DATE);
Output: 290
Example 1: SELECT TD_DAY_OF_CALENDAR(CURRENT_DATE);
Output: 43389
Example 1: SELECT TD_WEEKDAY_OF_MONTH(CURRENT_DATE);
Output: 3
Example 1: SELECT TD_WEEK_OF_MONTH(CURRENT_DATE);
Output: 2
Example 1: SELECT TD_WEEK_OF_YEAR(CURRENT_DATE);
Output: 41
Example 1: SELECT TD_WEEK_OF_CALENDAR(CURRENT_DATE);
Output: 6198
Example 1: SELECT TD_MONTH_OF_QUARTER(CURRENT_DATE);
Output: 1
Example 1: SELECT TD_MONTH_OF_YEAR(CURRENT_DATE);
Output: 10
Example 1: SELECT TD_MONTH_OF_CALENDAR(CURRENT_DATE);
Output: 1426
Example 1: SELECT TD_QUARTER_OF_YEAR(CURRENT_DATE);
Output: 4
Example 1: SELECT TD_QUARTER_OF_CALENDAR(CURRENT_DATE);
Output: 476
Example 1: SELECT TD_YEAR_OF_CALENDAR(CURRENT_DATE);
Output: 2018