title: SimpleDateFormat returns 24-hour date: how to get 12-hour date?
body: <p>I want current time in millis and then to store it in 12 hour format but with this piece of code I am getting 24 hour format time.</p>
  
  <pre><code>long timeInMillis = System.currentTimeMillis();
  Calendar cal1 = Calendar.getInstance();
  cal1.setTimeInMillis(timeInMillis);
  SimpleDateFormat dateFormat = new SimpleDateFormat("dd/mm/yyyy HH:mm:ss a");
  dateforrow = dateFormat.format(cal1.getTime());
  </code></pre>
  
  <p>can anybody suggest modifications to get the desired results?</p>