Date, time, and timestamp data types

Date, time, and timestamp are entered in the format prescribed by the SQL standard. The format must be entered exactly as specified below for the value to be accepted.

Example Date: 2004-12-31
Example Time(0): 12:58:43
Example Timestamp(3): 2002-01-23 23:02:12.123

Data type Format Description
Date YYYY-MM-DD Use four digits for year and two for month and day respectively.
Time(s) HH:MM:SS[.sF] The time data type is used to store a point in time. The number of fractional digits depends on the seconds precision s
Timestamp(s) YYYY-MM-DD HH:MM:SS[.sF] Used to store a specific point in time on a certain day. The number of fractional digits depends on the seconds precision s

See Also
Interval data types
Other data types









Copyright Mimer Information Technology AB, Box 1713, SE-751 47 UPPSALA, Sweden. All Rights Reserved.
Submit a comment or suggestion.