17.10 - Usage Notes - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-28
dita:mapPath
SQL_Functions__Expressions__and_Predicates.Upload_071421/djk1612415574830.ditamap
dita:ditavalPath
SQL_Functions__Expressions__and_Predicates.Upload_071421/wrg1590696035526.ditaval
dita:id
kby1472250656485

The optional parenthesis is syntax supported by the ODBC driver. For example:

SELECT CURRENT_DATE();

CURRENT_DATE returns the current date at the time when the request started. If CURRENT_DATE is invoked more than once during the request, the same date is returned. The date returned does not change during the duration of the request.

If you specify CURRENT_DATE without the AT clause or CURRENT_DATE AT LOCAL, then the value returned depends on the setting of the DBS Control flag TimeDateWZControl as follows:

  • If the TimeDateWZControl flag is enabled, CURRENT_DATE returns a date constructed from the session time and session time zone.
  • If the TimeDateWZControl flag is disabled, CURRENT_DATE returns a date constructed from the time value local to Vantage and the session time zone.

For more information, see “DBS Control (dbscontrol)” in Teradata Vantage™ - Database Utilities , B035-1102 .

CURRENT_DATE returns a value that is adjusted to account for the start and end of daylight saving time (DST) only in the following cases:

  • CURRENT_DATE is specified with AT [TIME ZONE] time_zone_string, where time_zone_string follows different DST and standard time zone displacements.
  • CURRENT_DATE is specified with AT LOCAL or without an AT clause and the session time zone was defined with a time zone string that follows different DST and standard time zone displacements.