DECLARE @Month int
DECLARE @Year int
DECLARE @Week int
SET @Month = MONTH(GETDATE())
SET @Year = YEAR(GETDATE())
SET @Week = DATEPART( WEEK,GETDATE())
/*First date of month*/
select DATEADD(month,@Month-1,DATEADD(year,@Year-1900,0))
/*Last date of month*/
select DATEADD(day,-1,DATEADD(month,@Month,DATEADD(year,@Year-1900,0)))
/*First date of week*/
select DATEADD(wk,@Week-1,DATEADD(year,@Year-1900,0))
/*Last date of week*/
select DATEADD(day,-1,DATEADD(week,@Week,DATEADD(year,@Year-1900,0)))
DECLARE @Year int
DECLARE @Week int
SET @Month = MONTH(GETDATE())
SET @Year = YEAR(GETDATE())
SET @Week = DATEPART( WEEK,GETDATE())
/*First date of month*/
select DATEADD(month,@Month-1,DATEADD(year,@Year-1900,0))
/*Last date of month*/
select DATEADD(day,-1,DATEADD(month,@Month,DATEADD(year,@Year-1900,0)))
/*First date of week*/
select DATEADD(wk,@Week-1,DATEADD(year,@Year-1900,0))
/*Last date of week*/
select DATEADD(day,-1,DATEADD(week,@Week,DATEADD(year,@Year-1900,0)))