TIMESTAMP Data Type

The TIMESTAMP data type represents date and time of day data.

Value range:

TIMESTAMP values range from January 1, -8192 through December 31, 8191, to an accuracy of one hundred nanoseconds (one ten-thousandth of a millisecond).

Date-only and Time-only Timestamps

TIMESTAMP values can be restricted to represent date data only or time of day data only.
As explained in the Remarks section below, a TIMESTAMP value that has been restricted to represent date data only or time of day data only will be formatted to display date elements only (year, month, and day) or time of day elements only (hour, minute, second, millisecond, and nanosecond).
TIMESTAMP values can be restricted to date-only or time-only timestamps in different ways.
Some input formats return TIMESTAMP input record fields whose values represent only dates or times of day. For example, the "date" and "time" fields of the IISW3C input format have values representing only dates and times of day, respectively.
TIMESTAMP constants can also be entered as date-only or time-only timestamp values, depending on the Timestamp Format Specifiers used.
In addition, the TO_DATE, TO_TIME, SYSTEM_DATE, and SYSTEM_TIME functions all return TIMESTAMP values representing dates or times of day only.
For more information, refer to the Remarks section below.

Remarks:


Conversion Functions:

Other data types to TIMESTAMP data type:

TIMESTAMP data type to other data types:

Full TIMESTAMP values to date-only TIMESTAMP values:

Full TIMESTAMP values to time-only TIMESTAMP values:

Date-only and time-only TIMESTAMP values to full TIMESTAMP values:

Local timezone TIMESTAMP values to UTC TIMESTAMP values:

UTC TIMESTAMP values to local timezone TIMESTAMP values:


See also:

Constant Values
Timestamp Format Specifiers

© 2004 Microsoft Corporation. All rights reserved.