Using The DateForm Setting | Data Types and Literals | Teradata Vantage - The DateForm Setting - Advanced SQL Engine - Teradata Database

SQL Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
zsn1556242031050.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1143
lifecycle
previous
Product Category
Teradata Vantageā„¢
Before you change the DateForm setting, you need to consider the effect the change has on the following:
  • Export data type of DATE values.

    Changing the DateForm setting changes the export data type of DATE values.

  • Data-entry format for dates.

    Changing the DateForm setting changes the data entry format of dates for new tables, but not for existing tables. To avoid data entry problems, however, you can enter all dates as ANSI DATE literals.

  • Display format of DATE columns.

    Changing the DateForm setting changes the display of DATE values in new tables, but not in existing tables. Therefore, DATE values display differently for new tables than for old tables. Because views are based on the underlying table, this is true for views of tables as well.

  • String-to-DATE comparisons and conversions.

    To compare or convert strings to DATE values, the strings must have the same format as the DATE values. Such comparisons can fail after you change the DateForm setting because the DATE format for new tables, views of new tables, and existing macros changes. To avoid format errors in string-to-DATE comparisons, however, you can specify dates as ANSI DATE literals.

  • Format of DATE values in macros being executed.

    Changing the DateForm setting can change the format of DATE values in macros, which can cause the macro to fail.

Changing the DateForm setting does not change the DATE format for the following:

  • Tables created prior to the format change
  • Tables created by users currently logged on
  • Macros executed by users currently logged on
  • Views based on tables that were created prior to the change