Send feedback on this topic.
Teradata.Client.Provider
Period Data Types Overview
.NET Data Provider for Teradata > Developer's Guide > Data Types > Period Data Types Overview

A Period is an anchored duration. It represents a set of contiguous time granules within that duration, and will consist of a beginning and ending bound. For example, in the case of a Period of type date the granularity of the time is represented by a day.

The bounds of a period are both inclusive and exclusive. It is inclusive in that the duration of the period starts from the beginning bound up to, but not including, the ending bound. For example, suppose a Period of type date contains the beginning and ending bound of:

   (2007-12-25, 2008-01-01)

The duration will include "2007-12-25" and not "2008-01-01". It extends for 7 days.

The Advanced SQL Engine has 5 Period data types:

SQL Data Type Description
Period( Date ) The Element type is the Date data type which has Year, Month and Day components.
The Time Granule is 1 Day.
Period( Time(fractional_second_digits) ) The Element type is the Time data type which has Hour, Minute, Second and Fractional-Second components.
The number of digits for the Fractional-Second component ranges from 0 to 6. The SQL Engine defaults the fractional seconds to 6 digits.
The smallest Time Granule is 0.000001 seconds and the largest Time Granule is 1 second.
Period( Time(fractional_second_digits) With Time Zone ) The Element type is the Time With Time Zone data type which has Hour, Minute, Second, Fractional-Second, Time Zone Hour and Time Zone Minute components.
The number of digits for the Fractional-Second component ranges from 0 to 6. The SQL Engine defaults the fractional seconds to 6 digits.
The Time Zone range of values are from -12:59 through +14:00.
The smallest Time Granule is 0.000001 seconds and the largest Time Granule is 1 second.
Period( Timestamp(fractional_second_digits) ) The Element type is the Timestamp data type which has Year, Month, Day, Hour, Minute, Second and Fractional-Second components.
The number of digits for the Fractional-Second component ranges from 0 to 6. The SQL Engine defaults the fractional seconds to 6 digits.
The smallest Time Granule is 0.000001 seconds and the largest Time Granule is 1 second.
Period( Timestamp(fractional_second_digits) With Time Zone ) The Element type is the Timestamp With Time Zone data type which has Year, Month, Day, Hour, Minute, Second, Fractional-Second, Time Zone Hour and Time Zone Minute components.
The number of digits for the Fractional-Second component ranges from 0 to 6. The SQL Engine defaults the fractional seconds to 6 digits.
The Time Zone range of values are from -12:59 through +14:00.
The smallest Time Granule is 0.000001 seconds and the largest Time Granule is 1 second.

The "SQL Data Type and Literals" manual describes each type in detail. This sections shows how the SQL Engine Date and Time data types map to the .NET type system.

The Base Class Library (BCL) does not have Period data type.

The .NET Data Provider for Teradata has five Period Provider Specific Types and it also converts the Teradata Period data types to BCL types.

SQL Type BCL Type Provider Specific Type
Period(Date) System.String TdPeriodDate
Period(Time) System.String TdPeriodTime
Period(Time With Time Zone) System.String TdPeriodTimeWithTimeZone
Period(Timestamp) System.String TdPeriodTimestamp
Period(Timestamp With Time Zone) System.String TdPeriodTimestampWithTimeZone

Each Provider Specific Type supports the following:

These types can be used as parameters in all database operations, and data can be retrieved using these types by invoking the corresponding TdDataReader methods.

Calendar

The Date and Time types that are used as the beginning and ending bounds of the Period types are based on the Gregorian calendar.

Daylight Savings

The Period types do not adjust for Daylight Savings.

In This Section

Period( Date ) Data Type

Period( Time ) Data Type

Period( Time With Time Zone ) Data Type

Period( Timestamp ) Data Type

Period( Timestamp With Time Zone ) Data Type

Restrictions for Period Types

Time Zone

Culture Specific Formatting and Parsing of Strings

Arithmetic Operations