0

I want to pick whether user has selected AM or PM in TimePicker View.Here is my onTimeSet method and I don't know what to put in place of the '?'.

public void onTimeSet(TimePicker view, int hourOfDay, int minute) {

            c.set(Calendar.HOUR_OF_DAY, hourOfDay);
            c.set(Calendar.MINUTE, minute);
c.set(Calendar.AM_PM, ?);

    }
Bmo
  • 1,212
  • 11
  • 34
  • Errk, never mind. Looked at the documentation. Does [this](http://developer.android.com/reference/java/util/Calendar.html#AM_PM) help? – Bmo May 07 '14 at 15:14
  • Check this answer: [LINK](http://stackoverflow.com/questions/2659954/timepickerdialog-and-am-or-pm/2660148#2660148) Basically (hourOfDay < 12) ? AM : PM – Mario May 07 '14 at 15:16

0 Answers0