秒转时分秒
作者:互联网
代码:
public static void main(String[] args) { //秒 转 时分秒 long srcSecs = 2370; long hours = srcSecs / 3600; long mins = (srcSecs % 3600) / 60; long secs = srcSecs % 60; //转 时分秒 System.out.println("时分秒 " + hours + ":" + mins + ":" + secs); }
运行结果:
标签:3600,long,60,srcSecs,mins,时分秒 来源: https://www.cnblogs.com/wulm/p/15327423.html