Implicit Conversion of DateTime Types | Teradata Vantage - Implicit Conversion of DateTime Types - Teradata Vantage - Analytics Database

SQL Data Types and Literals

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-06
dita:mapPath
uds1628112204571.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
exs1472253032394
lifecycle
latest
Product Category
Teradata Vantage™
Analytics Database performs implicit conversion on DateTime data types in the following cases:
  • When passing data using dynamic parameter markers, or the question mark (?) placeholder.
  • With INSERT, INSERT ... SELECT, and UPDATE statements.
  • With MERGE INTO statements.
  • When handling default values for the CREATE TABLE and ALTER TABLE statements. For more information, see DEFAULT Phrase.
  • During stored procedure execution, including the execution of the following statements: DECLARE, SELECT ... INTO, and SET. See Teradata Vantage™ - SQL Stored Procedures and Embedded SQL, B035-1148.

Implicit conversion is dependent on client-side support. For information about the client products which support implicit conversion of DateTime types, see the Teradata Tools and Utilities user documentation.

The following conversions are supported.

FROM... TO... For further details, see...
DATE TIMESTAMP Implicit DATE-to-TIMESTAMP Conversion.
TIME TIMESTAMP Implicit TIME-to-TIMESTAMP Conversion.
TIMESTAMP DATE Implicit TIMESTAMP-to-DATE Conversion.
TIMESTAMP TIME Implicit TIMESTAMP-to-TIME Conversion.
INTERVAL INTERVAL Implicit INTERVAL-to-INTERVAL Conversion.

Analytics Database performs implicit conversion on DateTime data types during assignment in the following cases:

FROM... TO... For further details, see...
DATE TIMESTAMP Implicit DATE-to-TIMESTAMP Conversion.
TIME TIMESTAMP Implicit TIME-to-TIMESTAMP Conversion.
TIMESTAMP DATE Implicit TIMESTAMP-to-DATE Conversion.
TIMESTAMP TIME Implicit TIMESTAMP-to-TIME Conversion.
Interval Exact Numeric The INTERVAL type must have only one field, e.g., INTERVAL YEAR.

Implicit INTERVAL-to-Numeric Conversion.

Exact Numeric Interval The INTERVAL type must have only one field, e.g., INTERVAL YEAR.

Implicit Numeric-to-INTERVAL Conversion.

There is a general restriction that in Numeric-to-Interval conversions, the INTERVAL type must have only one DateTime field. However, this restriction is not an issue when implicitly converting the expression of an AT clause because the conversion is done with two CAST statements. See Teradata Vantage™ - SQL Date and Time Functions and Expressions, B035-1211.

Analytics Database performs implicit conversion on DateTime data types in single table predicates and join predicates in the following cases:

FROM... TO... For further details, see...
TIMESTAMP DATE Implicit TIMESTAMP-to-DATE Conversion.
Interval Exact Numeric The INTERVAL type must have only one field, e.g., INTERVAL YEAR.

Implicit INTERVAL-to-Numeric Conversion.

Exact Numeric Interval Implicit Numeric-to-INTERVAL Conversion.
The following are not supported:
  • Implicit conversion from TIME to TIMESTAMP and from TIMESTAMP to TIME are not supported in comparisons.
  • Implicit conversion of DateTime types in set operations.