System-Defined Calendars - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
imq1591724555718.ditamap
dita:ditavalPath
imq1591724555718.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™

Vantage maintains several system-defined calendars in user DBC that you can use for a session. The supported calendars are based on the Gregorian calendar and have 365 days for normal years or 366 days for leap years.

The system-defined calendars have the following names and definitions.
  • Teradata

    All business calendar UDFs consider the CalendarPeriod for the Teradata calendar to be 1900-01-01 to 2100-12-31 and return an error message for any dates that are outside of this period.

    The EXPAND ON clause returns results for any dates whether or not they are outside of the system calendar period.

    This is the default calendar for all sessions.

  • ISO

    This calendar has the behavior of the ISO Calendar/European Calendar, with Monday as the WeekStart for any week.

    All business calendar UDFS consider the CalendarPeriod to be 1900-01-01 to 2100-12-31, but not 0001-01-01 to 9999-12-31, and return an error message for any dates that are outside of this period.

    The EXPAND ON clause returns results for any date whether they are outside the system calendar period or not.

  • COMPATIBLE

    The first week of every year for this calendar is January 1 to January 7.

    All the business calendar UDFs consider the CalendarPeriod to be 1900-01-01 to 2100-12-31, and return an error message for any dates that are outside of this period.

    The EXPAND ON clause returns results for any date whether they are outside the system calendar period or not.

See Teradata Vantage™ - SQL Date and Time Functions and Expressions, B035-1211 for complete documentation of these calendars.