Inclusive end dates describe whole calendar days, while BETWEEN compares the exact supplied endpoints. A date endpoint becomes midnight when compared with timestamp rows. A guarded disposable fixture makes the boundary conditions explicit.
SQL SERVER – Datetime Function TODATETIMEOFFSET Example
A quick example of the datetime function TODATETIMEOFFSET in SQL Server, and how it differs from SWITCHOFFSET when offsets change.
SQL SERVER – Datetime Function SWITCHOFFSET Example
SWITCHOFFSET changes a datetimeoffset value from its stored time zone offset to a new one. Here is a quick example of how it works in SQL Server 2008.
SQL SERVER – Difference Between DATETIME and DATETIME2 – WITH GETDATE
I repeat my DATETIME and DATETIME2 test with GETDATE instead of SYSDATETIME. See how the distinct values in each column compare this time.
SQL SERVER – Difference Between DATETIME and DATETIME2
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.






