Menu Close

TSQL – How to Find Quarter Start and End Date

If you would like to find the start and the end of a Quarter based of a date here is the t-sql code you will need:


SELECT DATEADD(q, DATEDIFF(q, 0, @yourdate), 0) AS [Quarter_Start]
, DATEADD(d, -1, DATEADD(q, DATEDIFF(q, 0, @yourdate) + 1, 0)) AS [Quarter_End]

For getting the previous Quarter start and end dates refer to this post: