Period Data Types - ODBC Driver for Teradata

ODBC Driver for Teradata® User Guide

Product
ODBC Driver for Teradata
Release Number
16.20
Published
August 2020
Language
English (United States)
Last Update
2020-08-25
dita:mapPath
fxv1527114222338.ditamap
dita:ditavalPath
Audience_PDF_product_legacy_odbc_include.ditaval
dita:id
B035-2526
lifecycle
previous
Product Category
Teradata Tools and Utilities

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:
  • SQL_PERIOD_DATE
  • SQL_PERIOD_TIME
  • SQL_PERIOD_TIME_WITH_TIME_ZONE
  • SQL_PERIOD_TIMESTAMP
  • SQL_PERIOD_TIMESTAMP_WITH_TIME_ZONE

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.