A developer filled a DATETIME and a DATETIME2 column with the same value and got different results. Here is the difference between DATETIME and DATETIME2.
SQL SERVER – Difference Between GETDATE and SYSDATETIME
What is the difference between GETDATE and SYSDATETIME? GETDATE stops at milliseconds, while SYSDATETIME in SQL Server 2008 goes much finer.
SQL SERVER – Precision of SMALLDATETIME – A 1 Minute Precision
The precision of SMALLDATETIME is 1 minute. Seconds are rounded up or down to the nearest minute, and this simple example shows exactly how.
SQL SERVER – DATE and TIME in SQL Server 2008
What happens when you convert DATE and TIME in SQL Server 2008 to DATETIME? A quick demo shows the midnight and 1900 surprise.
SQL SERVER – Get Date of All Weekdays or Weekends of the Year
Tejas Shah’s easy script to list the date of all weekdays or weekends of a year with a recursive CTE, first written to find every Sunday of 2010.
SQL SERVER – Get Time in Hour:Minute Format from a Datetime – Get Date Part Only from Datetime
Get the time in Hour:Minute Format, or just the date, from a DATETIME with CONVERT styles 108 and 101, or with the TIME and DATE types in SQL Server 2008.
SQL SERVER – Find Last Date Time Updated for Any Table
Want the last date time a table was updated without an UpdatedDate column? The sys.dm_db_index_usage_stats DMV shows it. A quick demo on AdventureWorks.






