Preciso que retorne 2013/10/24 15:13:17
estou fazendo a seguinte rotina
String dateStr = "Thu Oct 24 15:13:17 BRST 2013";
DateFormat formatter = new SimpleDateFormat("E MMM dd HH:mm:ss Z yyyy");
Date date = (Date)formatter.parse(dateStr);
System.out.println(date);
Calendar cal = Calendar.getInstance();
cal.setTime(date);
String formatedDate = cal.get(Calendar.DATE) + "/" + (cal.get(Calendar.MONTH) + 1) + "/" + cal.get(Calendar.YEAR);
System.out.println("formatedDate : " + formatedDate);
porem esta dando erro no formatter :
Exception in thread “main” java.text.ParseException: Unparseable date: “Thu Oct 24 15:13:17 BRST 2013”
at java.text.DateFormat.parse(DateFormat.java:337)
at controle.Main.main(Main.java:44)
Java Result: 1