Welcome to plsql4all.blogspot.com SQL, MYSQL, ORACLE, TERADATA, MONGODB, MARIADB, GREENPLUM, DB2, POSTGRESQL.

Friday, 24 July 2015

sys_calendar.calendar Calendar in Teradata

You can get the following functionalities from the Teradata view sys_calendar.calendar

Below are the functions which can be use from view called sys_calendar.calendar:-

1) calendar_date
2) day_of_week
3) day_of_month
4) day_of_year
5) day_of_calendar
6) weekday_of_month
7) week_of_month
8) week_of_year
9) week_of_calendar
10) month_of_quarter
11) month_of_year
12) month_of_calendar
13) quarter_of_year
14) quarter_of_calendar
15) year_of_calendar

For example:-

SELECT * FROM SYS_CALENDAR.CALENDAR WHERE CALENDAR_DATE='2015-07-20'   

No comments:

Post a Comment

Please provide your feedback in the comments section above. Please don't forget to follow.