I am getting date in html 5 input type = "date" format..in mm/dd/yyyy format. Then I am getting it String fDate = request.getParameter("fromDate");
room.setFromDate(fDate);
Then while trying to run query
insert into tbl_room_under_maintenance(room_id,room_number,from_date,to_date)
values(?,?,to_date(?,'MM/DD/YYYY'),to_date(?,'MM/DD/YYYY'))
PS1.setString(3,room.getFromDate().trim());
PS1.setString(4,room.getToDate().trim());
it shows error : java.sql.SQLException: ORA-01843: not a valid month