DECLARE @BeginDateTime DateTime
SELECT @BeginDateTime =
dateadd(DAY,1-DATEPART(WEEKDAY,GETDATE()),GETDATE())
SELECT CONVERT(VARCHAR(20),@BeginDateTime,23) AS WeekBeginDateTime,CONVERT(VARCHAR(20),DATEADD(DAY,6,@BeginDateTime),23) AS WeekEndDateTime
SELECT CONVERT(VARCHAR(20),DATEADD(DAY,-DATEPART(DAY,GETDATE())+1,GETDATE()),23) AS MonthBeginDateTime,CONVERT(VARCHAR(20),DATEADD(MONTH,1,DATEADD(DAY,-DATEPART(DAY,GETDATE())+1,GETDATE())),23) AS MonthEndDateTime