16.20 - Period Data Types - ODBC Driver for Teradata

ODBC Driver for Teradata® User Guide

ODBC Driver for Teradata
August 2020
User Guide

A period is an anchored time duration. It represents a set of contiguous time granules within that duration. It has a beginning bound (defined by the value of a beginning element) and an ending bound (defined by the value of an ending element). The representation of the period is inclusive-exclusive (for example, the period extends from the beginning bound up to–but not including–the ending bound).

The element type of a Period data type is the data type of the beginning and ending elements of a value of that Period data type. The element type can be any DateTime data type. The DateTime data types are DATE, TIME, and TIMESTAMP. The TIME and TIMESTAMP data types have a number (0-6) of fractional seconds in the seconds field which can be specified, or the default is 6; for example, TIME(3) and TIMESTAMP(6). TIME and TIMESTAMP can also explicitly include a time zone field by specifying WITH TIME ZONE (if WITH TIME ZONE is not specified, a time zone field is implicitly not included). Note that the element type must be the same for both the beginning and ending elements of a period.

ODBC driver supports the following ODBC SQL types:

These types are referred to as Period ODBC SQL types.

No new ODBC C types are added; the ODBC standard does not allow for that.