Tag Archives: Get Quarter Details

T-SQL – How to get the Financial Quarter details of a date field

declare @table table ( [Paid Date] date ) insert into @table values(‘20150102’),(‘20150512’),(‘20150830’),(‘20151231’),(‘20141230’) ;WITH Quarters AS ( SELECT Q = ‘Q1’, MonthBegin = 1, MonthEnd = 3 UNION SELECT Q = ‘Q2’, MonthBegin = 4, MonthEnd = 6 UNION SELECT Q … Continue reading

Posted in SQL | Tagged , , , , | 4 Comments