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,753 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,753 reads
Dive deep into the powerful SQL window functions, LAG() and LEAD(). Explore their intricacies, discover real-world examples, and avoid common pitfalls.
2023-12-11
8,500 reads
Learn to calculate Start / First of Week, End of Week, Start of Next Week, Year, Quarter, and Month of the week, Week Numbers and more in T-SQL (Jeff Moden)
2022-07-13
32,988 reads
2021-02-04
730 reads
2020-02-27
23,360 reads
Have you ever wanted to compute age, but the results from the DATEDIFF function seemed to be wrong some of the time? This tip covers why the DATEDIFF function does not always reliably compute age.
2012-05-23
4,752 reads
The honeymoon is over, and macOS 26 Tahoe broke the Rosetta 2 emulation layer...
By Chris Yates
There are moments in technology when the ground shifts beneath our feet. Moments when...
Why Developers Shouldn’t Have sysadmin access in SQL Server 7 reasons—and exactly what to do instead It...
I have noticed sp_executesql also makes a single plan for a stmt with parameter...
Comments posted to this topic are about the item Find Invalid Objects in SQL...
If I want to track which login called a stored procedure and use the value in an audit, what function can I use to replace the xxx below?
create procedure AddNewCustomer @customername varchar(200) AS BEGIN DECLARE @added VARCHAR(100) SELECT @added = xxx IF @customername IS NOT NULL INSERT dbo.Customer ( CustomerName, AddedBy ) VALUES (@customername, @added) ENDSee possible answers