Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Constructing a SQL statement to filter dates 1

Status
Not open for further replies.

logo

Programmer
Aug 22, 2001
56
US
I am connect to Access 2000 via ADODC and am trying to filter my data according to a "date" field. This field is actually a "date/time" field, but only displays dates like 9/26/2001 in the table.

I'm not sure why this does not work--and what I need to do to fix it.

select date from (tablename)
where date = '9/26/2001'

 
Because the database is an Access database, you should enclose the date in # #, instead of ' '. The ' ' works with SQL Server and MySQL though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top