Rules Applied for the First Year of an Era - Advanced SQL Engine - Teradata Database

SQL Data Types and Literals

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

For the first year of an era, the default month and day is affected by the starting date of the era. For other years, the standard default of the first month and first day are applied.

The following rules are applied for the first year of an era:

  • If the day and month have not been indicated, the day is set to the first day of that era (for example, day 25 for Showa era) and the month is set to the first month of that era (for example, month 12 for Showa era).
  • If the day is indicated but the month is not, the month is set to the first month of that era.

    Note that this can produce an error.

    For example, the date '平成01年06日' indicates the first year of the Heisei era and day 6. The month is defaulted to the first month of the Heisei era (January).

  • If the month is indicated but the day is not:
    • If it is the first month of the era (for example, month 12 for the Showa era), then day is set to the first day of that era.
    • If it is not the first month of the era, the day is set to 1 (the beginning of the month).