I have a date with the format as Fri Nov 16 00:00:00 CXT 2012
And I want to store in Mysql database using my java program.
Im writing the following code
SimpleDateFormat sdf1 = new SimpleDateFormat("dd-MM-yyyy");
java.util.Date date = sdf1.parse(split[4]);
java.sql.Date sqlStartDate = new java.sql.Date(date.getTime());
But it throws this error Exception in thread "main" java.text.ParseException: Unparseable date: "Fri Nov 16 00:00:00 CXT 2012"
How to do it. ?