I tried to covert Oct 31 2015 12:00AM into yyyyMMdd format but it is giving below exception.what could be the reason and solution ? Exception coming while running this code : java.text.ParseException: Unparseable date: "Oct 31 2015 12:00AM"
try{
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
System.out.println("output : "+formatter.format(formatter.parse("Oct 31 2015 12:00AM")));
}
catch(Exception e){
System.out.println("e: "+e);
}