Timestamp Data Types
The TIMESTAMP data type consists of a date and time, with optional time zone.
The format is as follows:
TIMESTAMP [(timestamp_precision)] [time_zone_spec]
timestamp_precision
(Optional) Indicates the number of digits of precision in the fractions of seconds, as an integer value from 0 to 9. The default is 6.
Note: When a value is entered that exceeds the specified precision, the value is truncated at the specified precision.
time_zone_spec
(Optional) Specifies a time zone as one of the following:
• WITH TIME ZONE
• WITHOUT TIME ZONE
• WITH LOCAL TIME ZONE
Note: The time value in TIMESTAMP WITH TIME ZONE data type indicates the time at the specified time zone.
Examples:
Note: Two TIMESTAMP WITH TIME ZONE values are considered identical if they represent the same instant in UTC, regardless of the TIME ZONE offsets stored in the database. For example:
TIMESTAMP '2012-12-15 9:30:55 -8:00'
is the same as
TIMESTAMP '2012-12-15 12:30:55 -5:00'