I have an Oracle Date
type to which I need to insert the current date.
I am using Java to generate this date but everything I've tried so far yeilds the following error:
java.sql.SQLException: ORA-01843: not a valid month
Can anyone suggest java code to generate a proper date?
Update:
The dates in the DB look like 11-DEC-06
SO, I've tried the following:
Calendar cal = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat("d-MMM-yy");
String date = sdf.format(cal.getTime());
And this doesn't work