Last and First Day of the previous months April 30, 2012 Get link Facebook X Pinterest Email Other Apps --LAST DATE OF PREVIOUS MONTH SELECT DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE()),0)) --GET FIRST DATE OF PREVIOUS 3 MONTHS SELECT @STARTDATE = DATEADD(DD,-(DAY(DATEADD(MM,1, GETDATE()))-1),DATEADD(MM,- 3, GETDATE())) Comments
Comments
Post a Comment