How to Find the Start and End Dates for the Current Week (and more)
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
33,469 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
33,469 reads
In this tip we look at how to change specific parts of a date such as the Year, Month or Day for data stored in a SQL Server table.
2019-12-17
2017-11-20
643 reads
An inline table valued function (iTVF) that can be used to calculate age in years.
2016-04-27 (first published: 2016-04-06)
1,067 reads
Find minimum and maximum values for all date columns in a table or range of tables, using a mask.
2016-09-15 (first published: 2014-10-27)
3,043 reads
2013-03-11 (first published: 2013-02-20)
2,135 reads
Code to create a handy date calendar cross-reference table with a ton of pre-populated, slice-and-dice data field variations to aid in complex date parameterization / selection criteria.
2019-04-15 (first published: 2009-10-06)
16,817 reads
This function will return the first, second, third, fourth or last day of a given month.
2009-03-03 (first published: 2009-02-10)
1,182 reads
By SQLPals
Dry-run xp_delete_file Before Actually Deleting Files? xp_delete_file doesn’t really have a...
By Brian Kelley
In the United States, today is Thanksgiving. The intent behind the holiday is to...
SQL Server 2025 RTM is here, and if you’re running Docker on macOS, you...
Comments posted to this topic are about the item Which Object Definitions Are Available?
Comments posted to this topic are about the item What's Your Theme Music?
Comments posted to this topic are about the item T-SQL in SQL Server 2025:...
For which of these object types can I get the code when I run the OBJECT_DEFINITION() function in SQL Server 2025? (choose 3)
See possible answers