In August 2008 Microsoft released
the latest version of the database server software, SQL Server 2008. SQL
Server 2008 includes a number of new features not found in SQL Server 2005, including: a terser T-SQL syntax; the new
MERGE statement; new data types and functions; enhanced encryption
and XML support.
In previous versions, SQL Server had only two date-related data types: datetime and smalldatetime, both of which allow
date and time values (the difference being that datetime allows for a larger range of possible dates and affords more precision on the time
than smalldatetime, but at the cost of larger storage space). SQL Server 2008 introduces four new date data types:
time, date, datetime2, and datetimeoffset.
This article explores the time and date data types and shows how they can be used and formatted from within an ASP.NET page.
This article also includes a short discussion on the datetime2 and datetimeoffset and compares and constrasts SQL Server 2008's
six different date data types. Read on to learn more!
Read More >