Last full week

M

Mike

Hi everyone,

I'm trying to figure out how to pull data, using a QUERY, for the last full
week. I tried to use a function as a criteria, but that didn't work out so
well... either I was doing it wrong, or it's not a supported function of A2k3.

I did figure out how to do last full month, but the solution to last full
week seems to be escaping me...

Between DateSerial(Year(Now()),Month(Now())-1,1) And
DateSerial(Year(Now()),Month(Now()),1)

Thanks for you help!
 
J

Jeff Boyce

Mike

I'm not sure you and I have the same definition for "last full week"! What
do you mean?

Have you looked into the DateAdd() function? You can use it to "add" a
negative number of days (or weeks, or minutes, or ...).

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

John Spencer

WeekStart: DateAdd("d",1-Weekday(Date()),Date) - 7
WeekEnd: DateAdd("d",7-Weekday(Date()),Date()) - 7

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

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