android - Convert double HOURS to MINUTES -


i have 2 edit text in app hours , minutes.

i have double:

    double hour;                 try {                     hour= double.parsedouble(dayhour.gettext().tostring().replace(',', '.'));                 } catch (numberformatexception e) {                     hour = 0;                  }    double minute;                  try {                     minute= double.parsedouble(dayminute.gettext().tostring().replace(',', '.'));                 } catch (numberformatexception e) {                     minute= 0;                  } 

after hour value want convert minutes. because want know time in minutes example: 3:42 = 222 minutes.

what need do?

1)change hours minutes
2)add minutes

double alltime = hour * 60 + minute; // alltime - in minutes 

Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -