DateFormat FORMAT_TIME_AM = new SimpleDateFormat("hh:mm");//works
If I use this code, everything works fine, but when I insert an "a" to display the AM/PM in the end, a parsing exception is raised.
DateFormat FORMAT_TIME_AM = new SimpleDateFormat("hh:mm a");//does not works
Here is the error:
com.finalagenda W/System.err java.text.ParseException: Unparseable date: "2:11" (at offset 4) com.finalagenda W/System.err﹕ at java.text.DateFormat.parse(DateFormat.java:579)
Any thoughts?