Data Type Compatibility | Date/Time Functions & Expressions | Teradata Vantage - Data Type Compatibility - 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 database convention of performing implicit conversions to resolve expressions of mixed data types is not supported for operations that include ANSI DateTime or Interval values.

To convert ANSI DateTime or Interval expressions, use the CAST function. See Teradata Vantage™ - Data Types and Literals, B035-1143.

The following restrictions apply to the values appearing in all DateTime and Interval scalar operations:

IF … THEN …
two DateTime values appear in the same DateTime expression both values must use the same type.

You cannot mix DATE, TIME, and TIMESTAMP values across type.

a DateTime and Interval values appear in the same DateTime expression the Interval value must contain only DateTime fields that are also contained within the DateTime value.
two Interval values appear in the same Interval expression both values must use the same type.

You cannot mix Year-Month with Day-Time intervals.