Here you can find the source of convertSecondsToTimeStamp(int seconds)
public static String convertSecondsToTimeStamp(int seconds)
//package com.java2s; public class Main { public static String convertSecondsToTimeStamp(int seconds) { String hours = Integer.toString(seconds / 3600); if (hours.length() == 1) { hours = '0' + hours; }/*from w w w .ja va 2 s. c o m*/ String minutes = Integer.toString((seconds % 3600) / 60); if (minutes.length() == 1) { minutes = '0' + minutes; } String secondsStr = Integer.toString(seconds % 60); if (secondsStr.length() == 1) { secondsStr = '0' + secondsStr; } return hours + ":" + minutes + ":" + secondsStr; } }