RichO
Registered Yoozer
- Local time
- Yesterday, 20:53
- Joined
- Jan 14, 2004
- Messages
- 1,036
This is a strange one. Initially this code worked, and then it gave me the error, and then it worked, and now I am getting the error again.
I have a text field in a table that will either be blank (null) or contain a date in the format mm/dd/yyyy. In my query I am trying to get all records that contain a date in that field and it's less than today's date. I am getting the error from my criteria in this:
SELECT * FROM myTable WHERE CDate(Nz(Hold_Expiry_Date))<Date()
This is the only way I could think to code it. Hold_Expiry_Date is a text field so I need to convert it to a date field before comparing it to a date data type. What is the proper syntax to code this so I don't get the error?
Thanks
I have a text field in a table that will either be blank (null) or contain a date in the format mm/dd/yyyy. In my query I am trying to get all records that contain a date in that field and it's less than today's date. I am getting the error from my criteria in this:
SELECT * FROM myTable WHERE CDate(Nz(Hold_Expiry_Date))<Date()
This is the only way I could think to code it. Hold_Expiry_Date is a text field so I need to convert it to a date field before comparing it to a date data type. What is the proper syntax to code this so I don't get the error?
Thanks