To get the quarter
-------------------------
SELECT DATEADD(QQ, DATEDIFF(QQ,0,GETDATE()),0) as [Start Of Qaurter],DATEADD(s,-1,DATEADD(QQ, DATEDIFF(QQ,0,GETDATE())+1,0)) as [End Of Quarter]
SELECT DATEADD(QQ, DATEDIFF(QQ,0,'12/05/2012'),0) as [Start Of Qaurter],DATEADD(s,-1,DATEADD(QQ, DATEDIFF(QQ,0,GETDATE())+4,0)) as [End Of Quarter]
No comments:
Post a Comment