return weekend results on Monday, yesterday's results otherwise

brucle

Registered User.
Local time
Today, 14:33
Joined
Feb 17, 2003
Messages
27
I am trying to filter a form to show the entire weekend's activity on Monday but only yesterday's activity Tuesday through Friday. Using this code I can return Friday's results on Monday and yesterday's for the rest. How do I get the range Friday to Sunday?

IIf(DatePart("w",Now())=2,Date()-3,Date()-1)

Using >Date()-3 doesn't work.

Thanks

Bruce
 
have you tried dateadd("d",-3,Date())
 
Still only returns Friday's records

Thanks for the reply. I tried dateadd but it only returned Friday's records not the entire weekend.

Bruce
 
Oh yeah sorry


between dateadd("d",-3,Date()) AND Date()
 
not yet

Thanks again. However...
IIf(DatePart("w",Now())=2,(Between DateAdd("d",-3,Date()) And Date()),Date()-1)

returned no records at all. The filter works separately, but not in the if statement.

Thanks

Bruce
 
IIf(DatePart("w",date())=2,(Between DateAdd("d",-3,Date()) And Date()), DateAdd("d",-1,Date())

returns some... but it doesnt return them all... ill keep working on it... maybe someone else sees something im missing
 

Users who are viewing this thread

Back
Top Bottom