15.00 - Scalar Operations and DateTime Functions - 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)

Scalar Operations and DateTime Functions

DateTime functions are those functions that operate on either DateTime or Interval values and provide a DateTime value as a result.

The supported DateTime functions are:

  • CURRENT_DATE
  • CURRENT_TIME
  • CURRENT_TIMESTAMP
  • EXTRACT
  • To avoid any synchronization problems, operations among any of these functions are guaranteed to use identical definitions for DATE, TIME, or TIMESTAMP so that the following are always true:

  • CURRENT_DATE = CURRENT_DATE
  • CURRENT_TIME = CURRENT_TIME
  • CURRENT_TIMESTAMP = CURRENT_TIMESTAMP
  • CURRENT_DATE and CURRENT_TIMESTAMP always identify the same DATE
  • CURRENT_TIME and CURRENT_TIMESTAMP always identify the same TIME
  • The values reflect the time when the request started and do not change during the duration of the request.

    Example  

    The following example uses the CURRENT_DATE DateTime function:

       SELECT INTERVAL '20' YEAR + CURRENT_DATE;

    Related Topics

     

    For more information on …

    See …

    CURRENT_DATE

    “CURRENT_DATE” on page 349

    CURRENT_TIME

    “CURRENT_TIME” on page 355

    CURRENT_TIMESTAMP

    “CURRENT_TIMESTAMP” on page 359

    EXTRACT

    “EXTRACT” on page 870