Link to home
Start Free TrialLog in
Avatar of bildozer
bildozer

asked on

Date between Monday and previous day of week in TSQL

I'm trying to pull all records between Monday and the day before.

For instance, on Thursday, I need the date range of Monday through Wednesday.

I've got a script that uses the following code:

 
SELECT * from dbo.events
WHERE dbo.events.eventdate BETWEEN DATEADD(wk,DATEDIFF(wk,7,getdate()),6) and getdate() 

Open in new window


This gives the range a start day of Sunday. How should I modify it to treat Monday as the start of the week?

Thanks in advance.
SOLUTION
Avatar of Scott Pletcher
Scott Pletcher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial