15.00 - About the Business Calendars - Teradata Database

Teradata Database SQL Functions, Operators, Expressions, and Predicates

Product
Teradata Database
Release Number
15.00
Content Type
Programming Reference
Publication ID
B035-1145-015K
Language
English (United States)
Last Update
2018-09-24

About the Business Calendars

A business calendar defines business and non-business days. The significance of a day being a business day or a non-business day is user-determined. For example, a business day could be a work day, and a non-business day could be either a non-working day, a weekend day, a holiday, or a vacation day. You can define different week patterns (weekdays and weekends) and exceptions (holidays and business open and closed days) for the system-defined calendars.

There are three Teradata system-defined business calendars that you can set for your session:

  • Teradata
  • ISO
  • COMPATIBLE
  • All three calendars are based on the de facto international standard, the Gregorian calendar. The Gregorian calendar has 365 days in most years and 366 days in a leap year. The calendars differ in how they define weeks and whether they allow partial weeks. You can use macros to specify weekday/weekend patterns and exceptions to the patterns.

    The calendars support January 1, 1900, to December 31, 2100. The default session calendar is Teradata. Each calendar defaults to all business days. You can change that pattern using a macro. See “About Business Calendar Macros” on page 384.

    Calendar Differences

     

    For This Calendar...

    The First Full Week Begins...

    Teradata

    on Sunday.

    The days of the year before Sunday belong to Week 0.

    For example, if the year starts on January 1, 2004 (a Thursday), then Week 0 is from January 1 to January 3. Week 1 begins on Sunday, January 4.

    ISO

    on Monday.

    The first week of the year is the first week that has at least 4 days. If a week has fewer than 4 days, it belongs to the last week of the previous year. There are no partial weeks.

    This calendar follows the ISO and European standard. For example, if the year starts on January 1, 2008 (a Tuesday) and the week start is Monday, week 1 of 2008 is from December 31, 2007, to January 6, 2008.

    COMPATIBLE

    on January 1. regardless of what day of the week that is.

    There can be partial weeks with 1 day (for most years) or 2 days (for leap years) at the end of the year. The day the week begins can change from year to year.

    This calendar is Oracle-compatible. For example, if January 1, 2011, is a Saturday, the first week of the year is from Saturday, January 1, 2011, through Friday, January 7, 2011.