amacfarl
Aug 5th, 1999, 08:59 PM
Sorry to bother you again. I am stumped, and I have looked everywhere for
the solution but cannot find it. You have in the past been so kind in
helping me, I was wondering whether you would be prepared to help me again.
THis is my problem. Dates in SQL with VB. Why doesn't the following code
work!
Set patientDataLEAP = dbLEAP.OpenRecordset("SELECT * From patientRecords
Where DateOfRegistration < #01/08/99#")
Or
Set patientDataLEAP = dbLEAP.OpenRecordset("SELECT * From patientRecords
Where DateOfRegistration < '01/08/99')
Or
Set patientDataLEAP = dbLEAP.OpenRecordset("SELECT * From patientRecords
Where DateOfRegistration < " & Cdate(01/08/99))
How can I compare dates? Help
Any help is much appreciated.
Cheers
Angus
the solution but cannot find it. You have in the past been so kind in
helping me, I was wondering whether you would be prepared to help me again.
THis is my problem. Dates in SQL with VB. Why doesn't the following code
work!
Set patientDataLEAP = dbLEAP.OpenRecordset("SELECT * From patientRecords
Where DateOfRegistration < #01/08/99#")
Or
Set patientDataLEAP = dbLEAP.OpenRecordset("SELECT * From patientRecords
Where DateOfRegistration < '01/08/99')
Or
Set patientDataLEAP = dbLEAP.OpenRecordset("SELECT * From patientRecords
Where DateOfRegistration < " & Cdate(01/08/99))
How can I compare dates? Help
Any help is much appreciated.
Cheers
Angus