String start_date = request.getParameter("datepicker1"); SimpleDateFormat formater = new SimpleDateFormat("MM-dd-yyyy"); Date result = formater.parse(start_date); // SimpleDateFormat newFormater = new SimpleDateFormat("yyyy-MM-dd"); // out.println(newFormater.format(result)); String end_date = request.getParameter("datepicker2"); SimpleDateFormat formater1 = new SimpleDateFormat("MM-dd-yyyy"); Date result1 = formater.parse(start_date); // SimpleDateFormat newFormater1 = new SimpleDateFormat("yyyy-MM-dd"); // out.println(newFormater1.format(result1));
INSERT INTO custorder VALUES ('Kevin', 'yes' , STR_TO_DATE('1-01-2012', '%d-%m-%Y') ) ; ^ ^ ---parenthesis removed--| and added here ------|
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)