I want to parse the following date:
24 07 2017 3:47:57 AM
with the following format:
SimpleDateFormat df2 = new SimpleDateFormat("dd MM yyyy hh:mm:ss a");
df2.setTimeZone(TimeZone.getTimeZone("UTC"));
try {
df2.parse(dateStr + " "+ sunrise);
}catch(ParseException e){
e.printStackTrace();
}
But I get the following error:
java.text.ParseException: Unparseable date: "24 07 2017 3:47:57 AM"