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

How to insert a date/time field in access database using Java

P: 1
I have to insert a date/time field in access database from my java code. But the date/time field format in DB is MM/DD/YYYY HH/MM/SS AM/PM.I tried the code below.
DateTime date=new DateTime();
SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss a");
date=formatter.parseDateTime(congestion_details[2]);

where congestion_details[2] is the string to be converted.It shows the error - cannot find symbol class DateTime. please advice
Thanx in advance.
Mar 14 '12 #1
Share this Question
Share on Google+
1 Reply


10K+
P: 13,264
See the advice given here: bytes.com/topic/oracle/answers/935552-database
Mar 14 '12 #2

Post your reply

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