By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,667 Members | 2,255 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,667 IT Pros & Developers. It's quick & easy.

Date format problem in MS-ACCESS

P: 2
Hi All,

I am executing a select query which involve join between three tables through jdbc. I am using MS-ACCESS as database.
This query needs to get the data based on some conditions on date fields.
While executing the query I am getting [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
I found where the problem is but i don't know how to solve.
Problem is in date format.

where TT.ARRIVED between '2007-07-01 00:00:00' and '2007-07-30 00:00:00'
In the above part of the query ARRIVED is a DATE/TIME type field in MS-ACCESS and its format is General Date.
Please tell me how to give this format from java.

Thanks in advance.
Jun 25 '07 #1
Share this Question
Share on Google+
1 Reply


10K+
P: 13,264
Hi All,

I am executing a select query which involve join between three tables through jdbc. I am using MS-ACCESS as database.
This query needs to get the data based on some conditions on date fields.
While executing the query I am getting [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
I found where the problem is but i don't know how to solve.
Problem is in date format.

where TT.ARRIVED between '2007-07-01 00:00:00' and '2007-07-30 00:00:00'
In the above part of the query ARRIVED is a DATE/TIME type field in MS-ACCESS and its format is General Date.
Please tell me how to give this format from java.

Thanks in advance.
If you are prividing the Date from a Java program use java.sql.Date.
Jun 25 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.