date function

  • Thread starter Thread starter dtroupe
  • Start date Start date
D

dtroupe

I have a database that I import data from text files and
Export to Excel. I am trying to auto run this process by
macro to Excel which works great except I can't iron out
the date problem? My field has Date and Time in the field
so I tried <Date()-1 in the query but no good. The other
would be >Date()-1 which returns all of the last day's
data and the present day. I just want to dump yesterday's
data to the file?
 
What exactly is the problem? Are you getting too much data?

If the file has data for more than just yesterday and today, you'll need to
set a range of dates to get only yesterdays:

BETWEEN Date()-1 AND Date()
 
Back
Top