title: Displaying the Time in AM/PM format in android
body: <p>I am getting the time using a time picker and displaying the time in the text view using following code...</p>
  
  <pre><code>private TimePickerDialog.OnTimeSetListener mTimeSetListener = new TimePickerDialog.OnTimeSetListener() {
      public void onTimeSet(TimePicker view, int hourOfDay, int minute) {
          Toast.makeText(SendMail.this, "Your Appointment time is "+hourOfDay+":"+minute,    Toast.LENGTH_SHORT).show();
          TextView datehid = (TextView)findViewById(R.id.timehidden);
          datehid.setText(String.valueOf(hourOfDay)+ ":"+(String.valueOf(minute)));
      }
  };
  </code></pre>
  
  <p>Now, the issue is when i set the time as 8:00 pm then i get the time displayed as 20:0... I want to display the time as 8:00 pm... How can i do that???</p>