title: java.text.ParseException: Unparseable date: "2016-02-01 10:00pm" (at offset 16)
body: <p>I want to change change Time format 12 hours to 24 hours.</p>
  
  <p>I have a date String like this</p>
  
  <pre><code>    String date = "2016-02-01";
      String time = "10:00pm";
  
  DateFormat df = new SimpleDateFormat("yyyy-MM-dd hh:mmaa");
  
          DateFormat outputformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
          Date daaateee = null;
          String output = null;
          try{
  
              String ddd =date + " " + time;
              daaateee= df.parse(ddd);
  
              output = outputformat.format(daaateee);
  
              System.out.println(output);
          }catch(ParseException pe){
              pe.printStackTrace();
          }
  </code></pre>
  
  <p>I am trying to change like this but its show me Error :</p>
  
  <pre><code>System.err: java.text.ParseException: Unparseable date: "2016-02-01 10:00pm" (at offset 16)
  </code></pre>
  
  <p>This code is working fine with all devices.but not working on Moto g3 which have marshmallow os. is there any reason not converting in marshmallow devices?</p>
  
  <p>Help me to convert Time format 12H to 24H.
  Thanks in Advance</p>