Date-time data types
Date-time data types are used to define points in time.
Syntax
This is the syntax for the date-time data types:
DATE | TIME | TIMESTAMP | TIMESTAMP WITH TIME ZONE
|
Parameters
DATE
Stores a date value as three parts: year, month, and day. The ranges for the parts are:
Year: 1 to 9999
Month: 1 to 12
Day: Lower limit is 1; the upper limit depends on the month and the year
TIME
Stores a time value as four parts: hours, minutes, seconds, and milliseconds. The ranges for the parts are:
Hours: 0 to 23
Minutes: 0 to 59
Seconds: 0 to 59
Milliseconds: 0 to 999
TIMESTAMP
Combines the parts of DATE and TIME
TIMESTAMP WITH TIME ZONE
Combines the elements of TIMESTAMP with a time zone offset