This question already has an answer here:
- Java - Unparseable date 2 answers
I'm trying to parse "Dec 6 04:13:01" with "MMM d HH:mm:ss", but it is not working! I spent a lot of time but cant figure it out.
Any ideas why it fails?
This question already has an answer here:
I'm trying to parse "Dec 6 04:13:01" with "MMM d HH:mm:ss", but it is not working! I spent a lot of time but cant figure it out.
Any ideas why it fails?
You are probably trying to parse it with JAPANESE
locale (guessing it from your profile + your web page), specify any english locale for example: Locale.US
String dateString = "Dec 6 04:13:01";
DateFormat df = new SimpleDateFormat("MMM d HH:mm:ss", Locale.US);
System.out.println(df.parse(dateString));