当我将特定格式应用于日期时出现解析异常。
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();
}
Run Code Online (Sandbox Code Playgroud)
AM 正在获取而不是 PM 问题图像