Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. String horacompleta = "12:39";
  2. String[] horamin = horacompleta.split(":");
  3.  
  4. int hora = Integer.parseInt(horamin[0]);
  5. int min = Integer.parseInt(horamin[1]);
  6.  
  7. int minutos = (hora * 60) + min; //Pega o total
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement