java.text.ParseException: Unparseable date: java.text.DateFormat.parse(DateFormat.java:579)
问题 I have problem with SimpleDateFormat . SimpleDateFormat dtfmt=new SimpleDateFormat("dd MMM yyyy hh:mm a", Locale.getDefault()); Date dt=dtfmt.parse(deptdt); In Android Emulator works fine but in phone I have this error: W/System.err: java.text.ParseException: Unparseable date: "24 Oct 2016 7:31 pm" (at offset 3) W/System.err: at java.text.DateFormat.parse(DateFormat.java:579) Any solution? 回答1: Your deptdt contains Oct which looks like an English month name. But your Locale.getDefault()