I want to get the two calender time difference
my calender is
val calendar1 = Calendar.getInstance()
calendar1[Calendar.HOUR+1] = hour.toString().toInt()
calendar1[Calendar.MINUTE] = minute.toString().toInt()
this is giving in 12 hours format Wed Nov 17 06:30:31 GMT+05:30 2021
current calender is:-
val calendar = Calendar.getInstance()
calendar[Calendar.HOUR]=calendar.get(Calendar.HOUR)
calendar[Calendar.MINUTE]=calendar.get(Calendar.MINUTE)
this is giving in 24 hours format Wed Nov 17 18:01:32 GMT+05:30 2021
how to get this calender in 12 hours format
thats why im having difficult in finding two calender difference
can anyone help?