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
35,487 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
35,487 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
694 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,115 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,136 reads
2013-03-11 (first published: 2013-02-20)
2,211 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.
2018-04-26 (first published: 2009-10-06)
17,027 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,224 reads
By Steve Jones
I caught this interesting item over on Pinal Dave’s blog: Eleven Interview Questions that...
By Hemantgiri
I use color-coded connections in SSMS to distinguish Production, Pre-Production, UAT, and Development. But...
Comments posted to this topic are about the item Building a SQL Server Fleet...
Comments posted to this topic are about the item Smart AI Agents and Data...
Comments posted to this topic are about the item RegEx Functions IV
I have this data in a table in a SQL Server 2025 database:
EmailAddressID EmailAddress 7 [email protected] 8 [email protected]If I run this query, which row(s) are returned?
SELECT top 10 * FROM person.EmailAddress WHERE REGEXP_LIKE(EmailAddress, '^D', 'i') AND BusinessEntityID IN (7,8)See possible answers