September 2010
Intermediate to advanced
1704 pages
111h 8m
English
date and time Data Types and FunctionsSQL Server 2008 introduces four new date and time data types:
• date
• time (precision)
• datetime2 (precision)
• datetimeoffset (precision)
Two of the most welcome of these new types are the new date and time data types. These new data types allow you to store date-only and time-only values. In previous versions of SQL Server, the datetime and smalldatetime data types were the only available types for storing date or time values, and they always store both the date and time. This made date-only or time-only comparisons tricky at times because you always had to account for the other component (for more detailed examples on working with datetime values in SQL Server, see Chapter 43). In addition, the ...