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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compare Dates in a SELECT statement

Status
Not open for further replies.

BirdieNamNam

Programmer
Feb 12, 2004
52
SE
Dear friends!

I want to write a SQL statement to retrieve all records matching a certain date. I am writing it in a VB6 project, addressing a ODBC database, created in Microsoft Access. I have tried

Code:
SELECT * FROM Bokningar WHERE Bokningar.Date = 2004-03-15

I can see that the date field Bokningar.Date has the format I am using. This does not work. Is there a way to tell all parties to convert the date into some common format, to make comparisions passible? Something like Date(Bokningar.Date) = Date(2004-03-15), or some other way that I cannot imagine?

Thankful for any input.

Bye, Sebastian.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top