Week Mon thru sunday

  • Can someone advise me to get date for 8/17 (Monday ) and 8/23 (Sunday) which is a week before the last.

  • sharonsql2013 (9/2/2015)


    Can someone advise me to get date for 8/17 (Monday ) and 8/23 (Sunday) which is a week before the last.

    Based on what?

  • Taking a guess I would say this:

    declare @CurDate date = getdate();

    select

    dateadd(week, datediff(week, 0, @CurDate) - 2, 0),

    dateadd(day, 6, dateadd(week, datediff(week, 0, @CurDate) - 2, 0))

  • That helps. Thanks

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply