日期:2014-05-20 浏览次数:20662 次
package com.zf.test;
public class Test04 {
public static void main(String[] args) {
System.out.println(formateNumberToDate(30));
System.out.println(formateNumberToDate(60));
System.out.println(formateNumberToDate(63));
System.out.println(formateNumberToDate(5501));
}
static String formateNumberToDate(long number){
long hour = number / 3600 ;
long minut = (number % 3600) / 60 ;
long second = number % 3600 % 60 ;
return String.format("%02d:%02d:%02d", hour , minut , second) ;
}
}