Date Restrictor

C

ChuckW

Hello,

I run a weekly report for the previous week either on
Monday or Tuesday. I want to run a report that will
capture a Monday to Sunday cycle. It could also be a
Sunday to Saturday cycle as well. Does anyone know what
date restrictor to use?

Thanks,

Chuck
 
J

John Spencer (MVP)

First day of the week being Monday.

DateAdd("d",2-Weekday(Date()),Date())

To get that back to Monday a week ago subtract 7 and to get to Sunday subtract 1

Between DateAdd("d",2-Weekday(Date()),Date())-7 and
DateAdd("d",2-Weekday(Date()),Date())-1

Adjust the numbers to get Sunday to Saturday (Basically change the 2 to a 1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top