-7

I'm new to java and I'm getting problem parsing this date: "12/19/2015 8:00:00 AM".

1 Answers1

0

Just follow the documentation and use the formatting elements that correspond to the string you have:

String strDate = "12/19/2015 8:00:00 AM";
DateFormat df = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss a");
Date date = df.parse(strDate);
Mureinik
  • 297,002
  • 52
  • 306
  • 350