Date Query

  • Thread starter Thread starter Dave Spence
  • Start date Start date
D

Dave Spence

Right now I run a report everyday that I update the Query
=#03/25/2004 5:30:00 AM# And <=#03/26/2004 5:30:00 AM#

The problem is I would like this to be automatic (ie the
day before on weekdays and on Monday, back to Friday).
Any suggestions would be welcome.
Thx
 
Dave Spence said:
Right now I run a report everyday that I update the Query

If you are saying you want the above values to be created automatically on
running the Query, then:

= (date() - 1 + timeserial(5,30,0)) AND (date() + timeserial(5,30,0))
 
Oh, forgot an operator:


Chris2 said:
If you are saying you want the above values to be created automatically on
running the Query, then:

= (date() - 1 + timeserial(5,30,0)) AND (date() + timeserial(5,30,0))

= (date() - 1 + timeserial(5,30,0)) AND <= (date() + timeserial(5,30,0))
 
Handle MONDAY by subtracting 3 instead of 1.

=(date() - IIF (Day(Date()) = 2,3,1) + timeserial(5,30,0))
AND <= (date() + timeserial(5,30,0))
 
Back
Top