15.00 - DateTime Data Types - Teradata Database

Teradata Database Design

prodname
Teradata Database
vrm_release
15.00
category
User Guide
featnum
B035-1094-015K

DateTime Data Types

 

DATE: 4 Bytes (All Platforms)

                       Year

                     Month

                       Day

AD January 1, 1  —  AD December 31, 9999

 

TIME: 6 Bytes (Packed64 Platforms)

           8 Bytes (Aligned Row Platforms)

                       Hour

                     Minute

                   Seconds

hh:mm:ss[.ssssss]

 

TIMESTAMP:  10 Bytes (Packed64 Platforms)

                        12 Bytes (Aligned Row Platforms)

        Year

      Month

        Day

        Hour

      Minute

     Second

yyyy-mm-dd hh:mm:ss

 

TIME WITH TIME ZONE: 8 Bytes (All Platforms)

       Hour

      Minute

      Second

     Timezone_Hour

      Timezone_Minute

hh:mm:ss.ssssss±hh:mm

 

TIMESTAMP WITH TIME ZONE: 12 Bytes (All Platforms)

  Year

  Month

  Day

  Hour

  Minute

  Second

     Timezone_Hour

     Timezone_Minute

yyyy-mm-dd hh:mm:ss±hh:mm

The following table indicates the alignment requirements for each of the ANSI/ISO DateTime data types and their respective sizes on packed64 and aligned row platforms. When the size of a stored value for a type differs for packed64 and aligned row platforms, the differing table cells are shaded.

 

                      Data Type

 

    Packed64 Size           (bytes)

   Aligned Row         Size (bytes)

        Allocated

   Aligned Row Size           (bytes)

DATE

                 4

             4

                 4

TIME

                 6

             4

                 8

TIMESTAMP

               10

             4

               12

TIME WITH TIME ZONE

                 8

             4

                 8

TIMESTAMP WITH TIME ZONE

               12

             4

               12