title: How do I change 'AM' to 'PM' in a Date Object JAVA
body: <p>I am trying to use Date objects and calculate time differences for an android app. But I face a problem when time is in '12:00'. I mean when I input date as 12:12:00 Java AM/PM formatter returns 12:12:00AM but it should be 12:12:00PM.</p>
  
  <p>I can't find any way to solve it.</p>
  
  <pre><code>Date date = new Date(); 
  String stringDate = "2019-09-13 12:12:00";  
  SimpleDateFormat formatter6=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");  
  Date date6 = formatter6.parse(stringDate);   
  SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss a");
  System.out.println(sdf.format(date6));
  </code></pre>
  
  <p>It returns 12:12:00 AM
  but it should be 12:12:00 PM for correct calculations</p>