--GET Start Day of Week
declare @no int,@date datetime=GETDATE()
select @no=DATEPART(WEEKDAY,@date)
select @date-(@no-1)
--GET End Day of Week
declare @no int,@date datetime=GETDATE()
select @no=DATEPART(WEEKDAY,@date)
select @date+(7-@no)
No comments:
Post a Comment