Need get Time in a 24 hour format while adding Time
You used hh
in your SimpleDateFormat
pattern. Thats the 12 hour format. Use kk
instead, that gives you the hours of the day in a 24 hour format. See SimpleDateFormat.
Simply create the instance of Calendar
and get 24 hr time by,
Calendar c = Calendar.getInstance();
int Hr24=c.get(Calendar.HOUR_OF_DAY);
int Min=c.get(Calendar.MINUTE);