cusimar9
09-14-2005, 11:27 AM
I've spent far too much time on this now and its driving me crazy :mad:
I am using an Access database and ASP
I have 2 fields in one table, one that holds a date and one that holds a time.
I have 2 strings, one with a date, and one with a time, which I need to compare to the fields in the table with a query.
For the moment I'm completely stuck on the date, haven't even tried the time yet!
This doesn't work:
"SELECT Count(*) AS TotalQty FROM MyTable WHERE Datefield = 14/09/2005"
I've tried just about everything with no luck. Can anyone suggest something? I know it stores the date as the integer and time as the real part, but I still can't seem to get it to compare only the date.
I've set the locale to be 2057 so its in dd/mm/yyyy, i've tried switching all the values round etc with no luck.
Someone must be able to point me in the right direction?
I am using an Access database and ASP
I have 2 fields in one table, one that holds a date and one that holds a time.
I have 2 strings, one with a date, and one with a time, which I need to compare to the fields in the table with a query.
For the moment I'm completely stuck on the date, haven't even tried the time yet!
This doesn't work:
"SELECT Count(*) AS TotalQty FROM MyTable WHERE Datefield = 14/09/2005"
I've tried just about everything with no luck. Can anyone suggest something? I know it stores the date as the integer and time as the real part, but I still can't seem to get it to compare only the date.
I've set the locale to be 2057 so its in dd/mm/yyyy, i've tried switching all the values round etc with no luck.
Someone must be able to point me in the right direction?