declare @day datetime declare @weekA datetime declare @weekB datetime declare @monthA datetime declare @monthB datetime SET @day= CONVERT(varchar(100), GETDATE(), 111) SET @weekA=(select DATEADD(day,-(DATEPART(weekday,@day)-1),@day) ) SET @weekB=(select DATEADD(day,-(DATEPART(weekday,@day)-5),@day) ) SET @monthA=( select DATEADD(dd,-day( @day )+1, @day)) Set @monthB=(select convert(char(7),getdate(),20)+'-25 00:00:00.000')