Getting parse exception when I'm applying a particular format to the date.
SimpleDateFormat df = new SimpleDateFormat("hh:mm a");
try {
String s=timeSlotsArrayList.get(position).getScheduledStartTime();
Date d = df.parse(s);
times.setText(df.format(d));
}
catch (ParseException e) {
e.printStackTrace();
}
AM is getting instead of PM issue image
df
? – NardooSimpleDateFormat
and friends, and adding ThreeTenABP to your Android project in order to use java.time, the modern Java date and time API. It is so much nicer to work with. – Plast