Given a date, find the specific date of Monday and Sunday of the week in which the date belongs

declare @date smalldatetime,@dateStart smalldatetime,@dateEnd smalldatetime
set @date='2018-01-09'
set @dateStart=@date-(datepart(weekday,@date))+2
set @dateEnd=@dateStart+6
select @dateStart,@dateEnd

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324684983&siteId=291194637