The JTable includes the time field, e.g. \"01:50\". I need to read this value into the integer variable. For this I´d like to convert time into minutes. For instance \"01:50
How about this:
String time = "1:50"; String[] split = time.split(":"); if(split.length == 2) { long minutes = TimeUnit.HOURS.toMinutes(Integer.parseInt(split[0])) + Integer.parseInt(split[1]); System.out.println(minutes); } /* Output: 110 */