Chapter 10. Working with Date and Time
Itzik Ben-Gan
When you need to store facts in your database, often those facts include date- and time-related attributes, such as order date, birth date, update timestamp, and so on. Dealing with date and time data can sometimes be challenging because of language-related issues, tricky querying logic, and other reasons.
This chapter focuses on working with date and time data. I’ll describe the date and time data types supported by SQL Server 2008, most of which are new. I’ll discuss built-in functions that operate on date and time data, and different aspects of date and time manipulation. I’ll also go over a few querying problems related to date and time data.
I’d like to thank several people from whom I originally ...
Get Inside Microsoft® SQL Server® 2008: T-SQL Programming 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.