New Date and Time Data Types

The date, time, datetime2, and datetimeoffset types are four new data types in SQL Server 2008 for storing dates and times, which you should now begin using for new database development in lieu of the traditional datetime and smalldatetime data types. The new types are now much better aligned with the .NET Framework, Microsoft Windows, and the SQL standard—unlike datetime and smalldatetime—and have important advantages over those types, including improvements in range, precision, and storage.

In addition, SQL Server 2008 delivers full Open Database Connectivity (ODBC), OLE-DB, and ADO.NET client provider support for all four data types. They are compatible for use across all other SQL Server components, including client ...

Get Programming Microsoft® SQL Server™ 2008 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.