Dates Between weeks

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

try to get my last week in to two fields. first day of last week and last day
of last week.

then i can use the fields to make a search between dates in a query
anyone??
Please, i know that u can do date()-7, but that will give me my last 7
days, not my 7 days of the last week
thank u
 
Roy

I don't understand what you are trying to do. If you know that Date()-7
gives you the date one week ago, what are you considering the "last day of
last week"? If Date()-7 is the first day of last week, yesterday (Date()-1)
would be the "last day", wouldn't it?

Or am I not understanding what YOU mean by first and last days, and last
week. Perhaps you could give a real example to illustrate?
 
So given today's date, you want to calculate the first Day of the prior week and
the last day of the prior week.

DateAdd("d",-WeekDay(Date),Date())-6

And

DateAdd("d",-WeekDay(Date),Date())


So for criteria, you might try

Between DateAdd("d",-WeekDay(Date),Date())-6 AND DateAdd("d",-WeekDay(Date),Date())

Which should give you

Between #10/3/2004# and #10/9/2004#

for today's date of 10/16/2004
 
Back
Top