String str = "08:03:10 pm"; DateFormat formatter = new SimpleDateFormat("hh:mm:ss a"); Date date = formatter.parse(str);
> IDE One demo
必看
> API Doc