毫秒数转换成天时分秒、时分秒

1、毫秒数转换成天时分秒
* 毫秒数转换成天时分秒 * @param milliseconds private void millisecondsConvertToDHMS(long milliseconds) { String daysStr; String hoursStr; String minutesStr; String secondsStr; long day = (milliseconds / 1000) / (24 * 3600); if (day < 10) { daysStr = "0" + day; } else { daysStr = day + ""; long hour = ((milliseconds / 1000) % (24 * 3600)) / 3600; if (hour < 10) { hoursStr = "0" + hour; } else { hoursStr = hour + ""; long minute = ((milliseconds / 1000) % 3600) / 60; if (minute < 10) { minutesStr = "0" + minute; } else { minutesStr = minute + ""; long second = (milliseconds / 1000) % 60; if (second < 10) { secondsStr = "0" + second; } else { secondsStr = second + "";
2、毫秒数转换成时分秒
* 毫秒数转换成时分秒 * @param milliseconds private void millisecondsConvertToHMS(long milliseconds) { String hoursStr; String minutesStr; String secondsStr; long hour = (milliseconds / 1000) / 3600; if (hour < 10) { hoursStr = "0" + hour; } else { hoursStr = hour + ""; long minute = ((milliseconds / 1000) % 3600) / 60; if (minute < 10) { minutesStr = "0" + minute; } else { minutesStr = minute + ""; long second = (milliseconds / 1000) % 60; if (second < 10) { secondsStr = "0" + second;