Why do ’14:48:34.69′ and ’14:48:34:69′ give different DATETIME values? Solve this puzzle with milliseconds to win a USD 50 Amazon Gift Card.
SQL SERVER – Adding Datetime and Time Values Using Variables
Adding a time variable to a datetime variable throws Msg 402. The fix is to CAST the time to datetime first. Examples of adding datetime and time values.
SQL SERVER – Finding If Date is Last Day of the Month
Did an employee join on the last day of the month? I show the add one day trick and the EOMONTH function from SQL Server 2012 to check it.
Interview Question of the Week #036 – What is the difference between @@DATEFIRST and SET DATEFIRST?
What is the difference between @@DATEFIRST and SET DATEFIRST? SET DATEFIRST changes the first day of the week, and @@DATEFIRST returns the current value.
SQL SERVER – Puzzle – Inside Working of Datatype smalldatetime
A developer got odd results when casting strings sent from an app. This puzzle looks at how the smalldatetime datatype works inside SQL Server.
SQL SERVER – Puzzle with Year Function
After my MONTH() contest, here is a puzzle with YEAR function: what do MONTH and YEAR return for the date 0001-1-1, and why? Take a guess first.
SQL SERVER – Quiz on knowing DATEPART and DATENAME Behaviors
Think date and time functions are a pain? Test yourself with this quick quiz on DATEPART and DATENAME behaviors in SQL Server.







