The following rules apply to assignments involving ANSI DateTime or Interval data types:
|Source Type||Target Type||Description|
|DATE||DATE||The types are compatible and assignments do not require conversion.
For compatibility with existing Teradata assignments, non-ANSI operations such as assigning a DATE to an INTEGER or an INTEGER to a DATE (with validity checking) follow existing Teradata assignment rules.
|TIME||TIME||The types are compatible and assignments do not require conversion.
The Teradata system value TIME is encoded as a REAL and is not compatible with ANSI TIME or TIME WITH TIME ZONE.
|TIMESTAMP||TIMESTAMP||The types are compatible and assignments do not require conversion.|
|Year-Month INTERVAL||Year-Month INTERVAL|
|Day-Time INTERVAL||Day-Time INTERVAL|
|Numeric||DATE||Vantage performs implicit type conversion before the assignment.
For more information, see Teradata Vantage™ - Data Types and Literals, B035-1143.
The INTERVAL type must have only one field. For example, INTERVAL YEAR.
For all other source/target data type combinations in assignments involving ANSI DateTime or Interval data types, the types must be explicitly converted.
To perform explicit conversions on ANSI DateTime or Interval data types, use the CAST function.