ACCESS 2000 AND THE DATE FUNCTION

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

Guest

We receive data from our corporate office, in an Excel spread sheet with the
date and time the data was collected in one cell. That data is then appended
into Access. We need a query that will filter out all records except the ones
from yesterdays date. We have tried using Date()-1 in the Criteria row of the
Date field and DateAdd("d",Date(),-1), but the query is always blank. Does
anyone have any suggestions?
 
WHERE DateField = Date()-1
....should work, but my guess is that the cells in Excel are formatted as
text. In that case, the following should work:
WHERE CDate(DateField) = Date()-1

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Office DevCon 2007. Sydney, Australia 3rd-4th Nov. Will you be there?
http://www.block.net.au/devcon/index.htm
 

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

Back
Top