Displaying the Time in AM/PM format in android -
i getting time using time picker , displaying time in text view using following code...
private timepickerdialog.ontimesetlistener mtimesetlistener = new timepickerdialog.ontimesetlistener() { public void ontimeset(timepicker view, int hourofday, int minute) { toast.maketext(sendmail.this, "your appointment time "+hourofday+":"+minute, toast.length_short).show(); textview datehid = (textview)findviewbyid(r.id.timehidden); datehid.settext(string.valueof(hourofday)+ ":"+(string.valueof(minute))); } };
now, issue when set time 8:00 pm time displayed 20:0... want display time 8:00 pm... how can that???
private string getreminingtime() { string delegate = "hh:mm aaa"; return (string) dateformat.format(delegate,calendar.getinstance().gettime()); }
Comments
Post a Comment