small SQL problem
Hello,
I have a small SQL problem...
I am designing an online bank using servlets for a university project and it allows customers to view their statements. They select which of their account numbers they want to view the statement for and the start and end date of the statement.
The problem lies with the dates. Here is the SQL:
SELECT date, details, amount, balance
FROM HISTORY
WHERE bankaccnumber=13494925 And date>=1/1/01 And date<=31/1/01;
All of the books I have looked at show dates in '1/1/01' format but whenever I try it this way I get a 'Data type mismatch in criteria expression' error (the 'date' field in the Database IS a Date type).
Although, whenever I run the query in Access and prompt the user to enter the start and end date, it works fine.
I have spoken to a few people and no-one seems to know why it is not working.
Any ideas?
Thanks

