16.20.16.20 - 16.20 - PERIOD(DATE) to PERIOD(TIMESTAMP) - Teradata Vantage NewSQL Engine

Teradata Vantageā„¢ Data Types and Literals

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

A PERIOD(DATE) value can be cast as PERIOD(TIMESTAMP[(n)] [WITH TIME ZONE]) using the CAST function.

The UTC value of the result elements are obtained after adjustment with respect to the current session time zone from the timestamps created by setting the date portion to the corresponding source elements and the time portions to 0. If the target type is PERIOD(TIMESTAMP[(n)] WITH TIME ZONE), both result time zone fields are set to the current session time zone displacement. An exception to this is if the source ending bound is the maximum DATE value; in that case, the result ending bound is set to the maximum TIMESTAMP value.