I am having similar problems to
Unable to parse DateTime-string with AM/PM marker
I even tried the solution provided in that link but it did not help.
SimpleDateFormat timingFormat = new SimpleDateFormat("h:mm a", Locale.US);
Date l = timingFormat.parse(time);
but I keep receiving
java.text.ParseException: Unparseable date: “12:34”.
When i enter 12:34 AM
Wait a second. The error says
12:34is unparseable, not12:34 AM. In that case, your input method is reading the first word up to whitespace and ignoring the “AM” part of your entry. Correct your input method so that it reads the entire input stream/string, and then it should parse correctly.