Oracle
 sql >> Database >  >> RDS >> Oracle

java.sql.SQLException:ORA-01843:errore di un mese non valido

Converti la data prima dell'inserimento:

String fDate = request.getParameter("fromDate");
SimpleDateFormat sm = new SimpleDateFormat("mm/dd/yyyy");
Date dat = sm.parse(fDate);
insert into tbl_room_under_maintenance(room_id,room_number,from_date,to_date)
values(?,?,?,?)
PS1.setDate(3,dat);