Examples | DATE-to-Period Conversion | Teradata Vantage - 17.10 - Example: Casting a DATE literal as PERIOD(DATE) - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Data Types and Literals

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

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')