Rules - Analytics Database - Teradata Vantage

SQL Date and Time Functions and Expressions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-10-30
dita:mapPath
cpk1628111786971.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
pxz1544241488545
lifecycle
latest
Product Category
Teradata Vantage™
The following rules apply to Interval expressions.
  • Expressions involving intervals are evaluated by converting the operands to integers, evaluating the resulting arithmetic expression, and then converting the result back to the appropriate interval.
  • The data type of both an interval_expression and an interval_primary is INTERVAL.
  • An interval_expression must contain either year-month interval components or day-time interval components. Mixing of INTERVAL types is not permitted.
  • Expressions involving intervals always evaluate to an interval, even if the expressions contain DateTime or Numeric expressions.
IF an interval_expression contains … THEN the result …
only one component of type INTERVAL is of the same INTERVAL type.
a single DateTime value or a start  TO end phrase contains the DateTime fields specified for the DateTime or start TO end phrase values.
more than one component of type INTERVAL is of an INTERVAL type including all the DateTime fields of the INTERVAL types of the component fields.