title: Calendar giving HOUR and MINUTE without leading zero - Android
body: <p>I know a lot of tutorials there about calendar giving minute and hours without leading zero. But those doesnt work for my codes. Can someone help me how to do this base on my codes? Calendar.MINUTE is not showing the zero integer whenever the minite is from 0-9.</p>
  
  <pre><code>Calendar cal = GregorianCalendar.getInstance();
    String am_pm, hour;
    cal.add(Calendar.MONTH, +1);
  
    if(cal.get(Calendar.AM_PM) == 0)
        am_pm = "AM";
        else
        am_pm = "PM"; 
  
  tv.setText(cal.get(Calendar.MONTH) + "-" + cal.get(Calendar.DAY_OF_MONTH) + "-" + cal.get(Calendar.YEAR));
    tv2.setText(cal.get(Calendar.HOUR) + ":" + cal.get(Calendar.MINUTE) + " " + am_pm);
  tv3.setText("Offered");
  </code></pre>