Date comparison in VBA (MS Acess)

  • Thread starter Thread starter anandmr65
  • Start date Start date
A

anandmr65

Hi,

I am trying to retreive some records after a certain date in exce
using VBA. The database is MS access. I am using the following query
it gives an error.
Select * from Datatable
where ModDate > format('01/21/2006', '\#mm/dd/yyyy\#').

Could somebody enlighten me how to use the date field in wher clause.

Thanks in advance for your help.

regards
Anan
 
Try this,
Select * from Datatable
where ModDate > #01/21/2006#
 

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