研究了一整天之后,得到的结果
getTimeBySecond = function( num ){ second = num % 60; //剩余秒数 minute = math.round( (num/60) % 60 ); //剩余分钟 hour = math.round( ((num/60)/60) % 24 ) //剩几个小时 day = math.round( ((num/60)/60)/24 ); //几天 return day++"天"++hour++"时"++minute++"分"++second++"秒"; } tm = time( "2022-09-02 16:01:00" ); cc = ( time(,"%Y-%m-%d %H:%M:%S" ) ) win.msgbox( getTimeBySecond( cc.diffsecond( tm ) ) );
完活~~~
发表评论