Date and Time Datatypes
All DBMS' support datatypes designed for the storage of date and time values (see Table D.3). Like numeric values, most DBMS' support multiple datatypes, each with different ranges and levels of precision.
Datatype | Description |
---|---|
DATE | Date value |
DATETIME (also known as TIMESTAMP) | Date time values |
SMALLDATETIME | Date time values with accuracy to the minute (no seconds or milliseconds) |
Specifying Dates There is no standard way to define a date that will be understood by every DBMS. Most implementations understand formats like 1999-12-30 or Dec 30th, 1999, but even those can be problematic to some DBMS'. ... |
Get Sams Teach Yourself SQL in 10 Minutes, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.