Example: Casting a DATE literal as PERIOD(DATE)

Teradata Vantageā„¢ Data Types and Literals

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1143-162K

In the following example, a DATE literal is cast as PERIOD(DATE). The result beginning bound is obtained from the source. The result ending element is set to the result beginning bound plus INTERVAL '1' DAY.

SELECT CAST(DATE '2005-02-03' AS PERIOD(DATE));

The following PERIOD(DATE) value is returned:

('2005-02-03', '2005-02-04')