Wednesday, September 26, 2012

Find Current QUARTER Start Date and End Date in SQL

SELECT  DATEADD(qq, DATEDIFF(qq, 0, GETDATE()),  0)'Start Date',DATEADD(qq, DATEDIFF(qq, - 1, GETDATE()), - 1)'End Date'


Output:

Start Date                                 End Date
2012-07-01 00:00:00.000 2012-09-30 00:00:00.000

0 comments:

Post a Comment