I had a String time format like 08:25 now how can I convert to float time value
String guestclosetime = getCurrentTime();
SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm");
timeFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
try {
System.out.println("starttime"+ TestRideFragment.getCurrentTime());
// convert12to24format(guestclosetime);
Date date1 = timeFormat.parse("00:20");//run
Date date2 = timeFormat.parse(guestclosetime);
//Date date3=timeFormat.parse(idle_time);
long sum = date1.getTime() + date2.getTime();
String date3 = timeFormat.format(new Date(sum));
System.out.println("The sum is "+date3);// 08:28
now I need the date3 as float how can I do in android.
see I had a scenario as a driver drops a person at x place here I get the current time like 08:30 AM. and after dropping he needs to reach his destination and he took 20 mins this is in float need to convert as a string and if we add this 2 we need to get the total time as 08:50 now this total time need to save as float
I need like 1.30 = 1.5 like that