There are a lot of mistakes developers make regarding dates and data types; an entire presentation could cover this topic alone.
For example:
- Containing "date" values (ex: 3/10/09, 09/10/03, 3-10) in a VarChar column, which in my opinion is the absolute worst T-SQL anti-pattern possible.
- Using SmallDateTime only to later discover that it only supports a max date of June 6, 2079.
- Doing something like this "... where enrolled_date <= '2011-01-31'" and then assuming the result will include enrollments entered on Jan 31, 2011.
- Inconsistent coding of GetDate() and GetUTCDate() in a datetime column and invalid assumptions by the SQL developer about what local time is contained in the datetime column.
- Etc, ad nauseum ...
"Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho