Data Type Compatibility | Date/Time Functions & Expressions | Teradata Vantage - 17.10 - Data Type Compatibility - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Date and Time Functions and Expressions

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1211-171K
Language
English (United States)

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.