Can anyone conform this query /?Will +Rep

Don2k7

New member
Local time
Today, 09:49
Joined
Jun 28, 2008
Messages
7
>=Now()-7

Does this query mean it will show everything 7 days before the todays date including today?
 
I wouldn't do it. The thing is that the date is internally stored as a floating number and thus subject to rounding error.

Better to use date functions- something like DateAdd(). Look in the Access help for details.
 
It would show everything from 7 days ago at the particular time you run this, to beyond. To get everything from 7 days ago and beyond you should really use

>=Date()-7

or

>=DateAdd("d", -7, Date())
 
And what I meant about the time, is that if you ran this at 3:00PM then you would only get records for 3:00pm or later on the day 7 days ago. Using Date instead of now you would get for the whole day.
 
It would show everything from 7 days ago at the particular time you run this, to beyond. To get everything from 7 days ago and beyond you should really use

>=Date()-7

or

>=DateAdd("d", -7, Date())

Is there anyway to make it the last seven days only nothing beyound that?
 

Users who are viewing this thread

Back
Top Bottom