Android examples for java.util:Second
convert Second To Hour
//package com.java2s; public class Main { public static String convertSecondToHour(String second) { String result = ""; int secondInt; try {//www .jav a2s .co m secondInt = Integer.parseInt(second); int h = secondInt / 3600; int m = (secondInt - h * 3600) / 60; int s = secondInt % 60; result = String.format("%02d:%02d:%02d", h, m, s); } catch (NumberFormatException e) { e.printStackTrace(); } return result; } }