Example: Casting a DATE literal as PERIOD(TIMESTAMP(4)) - Advanced SQL Engine - Teradata Database

SQL Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
zsn1556242031050.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1143
lifecycle
previous
Product Category
Teradata Vantageā„¢

In the following example, a DATE literal is cast as PERIOD(TIMESTAMP(4)). The result beginning bound is formed from the DATE literal and a time portion of zero. The result ending element is set to the result beginning bound plus INTERVAL '0.0001' SECOND.

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

The following PERIOD(TIMESTAMP(4)) value is returned:

('2005-02-03 00:00:00.0000', '2005-02-03 00:00:00.0001')