I am trying to send a date value from my java program into an oracle sql database. But I keep getting the error: java.text.parseexception: unparseable date.
I set the date format as:
SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd", Locale.ENGLISH);
java.sql.Date date = (java.sql.Date)df.parse(dob_text.getText());
I have set my database with the same date format. And try to send the date through a prepared statement like so:
ps.setDate(3, date);
I am entering a date 1994-09-09. That's the correct date format for the one I declared right? Is there something wrong with my java formation code? Has anyone else had this problem? Any help would be much appreciated