Date and Time Calculations Made Easy with EOMONTH, DATEDIFF, and DATEADD
Learn how to work with dates and calculate particular dates or elapsed time periods with some of the functions available in SQL Server.
2025-05-09
2,515 reads
Learn how to work with dates and calculate particular dates or elapsed time periods with some of the functions available in SQL Server.
2025-05-09
2,515 reads
2025-03-03
464 reads
Date manipulation is a common scenario when retrieving or storing data in a Microsoft SQL Server database. There are several date functions (DATENAME, DATEPART, DATEADD, DATEDIFF, etc.) that are available and in this tutorial, we look at how to use the DATEADD function in SQL queries, stored procedures, T-SQL scripts, etc. for OLTP databases as well as data warehouse and data science projects.
2025-01-27
2020-02-27
23,275 reads
Aaron Bertrand explores yet another scenario where a date/time function seems to cause the optimizer to behave unexpectedly.
2016-05-12
4,956 reads
Date manipulation is a common scenario when retrieving or storing data in a SQL Server database. There are several functions that are available and in this tip we look at how to use the DATEADD function.
2011-10-14
3,998 reads
Show the last month and year in a expression, based on a parameter called asofdate. Must format Date Month Year
2011-11-08 (first published: 2011-10-11)
9,052 reads
It’s been forgotten about and neglected for few years but I’ve decided to dust...
I am honored to announce that I have been renewed as a Microsoft MVP...
By Rohit Garg
🔍 Demystifying KTLO: A Deep Dive into Keep The Lights On Work in IT...
Comments posted to this topic are about the item How a Legacy Logic Choked...
Comments posted to this topic are about the item Navigating Multi Platform Realities in...
I have tried a number of times to export and then import my SSMS...
For the Question of the day, I am going to go deep, but try to be more clear, as I feel like I didn't give enough info last time, leading folks to guess the wrong answer... :) For today's question: You’re troubleshooting a performance issue on a critical stored procedure. You notice that a previously efficient query now performs a full table scan instead of an index seek. Upon investigating, you find that an NVARCHAR parameter is being compared to a VARCHAR column in the WHERE clause. What is the most likely cause of the query plan regression?
See possible answers