DATETIME Datatypes

Note

Note

SQL Server supports two date and time–related datatypes: DATETIME and SMALLDATETIME. Most of the discussions in this chapter are relevant to both types, but for simplicity’s sake, I will typically refer to just DATETIME. When discussing aspects that are specific to one of the types, I’ll refer to DATETIME and SMALLDATETIME separately.

DATETIME is one of the most frequently used datatypes and one of the most problematic ones, if not the most problematic. There are misconceptions regarding the storage format of DATETIME, many issues related to the different representation conventions, and many interesting querying problems related ...

Get Inside Microsoft® SQL Server™ 2005 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.