I use dates like 2013-10-23, 2013-10-23, 2013-10-23, 2013-10-23, 2013-10-23, 2013-10-23, 2013-10-23, 2013-10-23, 2013-10-23
I want to save these dates in the mysql database table column table
am using this code
String datevalue=request.getParameter("date");
this date value prints as follows 2013-10-23, 2013-10-23, 2013-10-23, 2013-10-23, 2013-10-23, 2013-10-23, 2013-10-23, 2013-10-23, 2013-10-23.
String[] datetokens=datevalue.split(",");
java.sql.Date dt = java.sql.Date.valueOf(new String(datevalue));
When I enter the time, I get this error
java.lang.IllegalArgumentException
introduce me how to solve this problem and save in the database
source
share