java - Convert String to date, Throws ParseException -


i want convert string 11-7-2013 10:51:10 date object.

formatter = new simpledateformat("dd/mm/yyyy hh:mm:ss");  try {     string date = "11-7-2013 10:51:10"     return formatter.parse(date); } catch (parseexception e) {     e.printstacktrace(); } 

i have following code, i'm getting parseexception.

try

formatter = new simpledateformat("dd-mm-yyyy hh:mm:ss");  

Comments