views:

29

answers:

1

Hi all,

I have another question, does any one know how to get the start date and end date of the current week?

Thanks very much.

Ling

+1  A: 

DATEPART(dw, GETDATE()) will return the current day of week as an integer (Sunday=1, Saturday=7)

Simple math will take care of the rest.

  • Saturday: DATEADD(dd, 7 - DATEPART(dw, GETDATE()), GETDATE())
  • Sunday: DATEADD(dd, -1 * DATEPART(dw, GETDATE()), GETDATE())
Joe Philllips
fantastic, Thanks d03boy
LingAi
Please click on the checkmark under the voting arrows to accept this as your answer.
Joe Philllips
What about those places on this planet earth where the week starts on MONDAY ??
marc_s