秒转换时分秒代码
本帖最后由 supermyth 于 2020-10-27 17:02 编辑$a="360000"
$hour = floor($a/3600);
$min = floor(($a-3600 * $hour)/60);
$sec = floor((($a-3600 * $hour) - 60 * $min) / 60);
MsgBox(0,"", $hour & "时" & $min & "分"& $sec & "秒")
错的
$sec = $a - 3600 * $hour - 60 * $min $a="360000"
$hour = floor($a/3600)
$min = floor(($a-3600 * $hour)/60)
$sec = $a - 3600 * $hour - 60 * $min
MsgBox(0,"", $hour & "时" & $min & "分"& $sec & "秒") 本帖最后由 yohoboy 于 2020-10-29 01:29 编辑
新增日
#include <Date.au3>
While 1
$a=Floor(_Date_Time_GetTickCount() /1000)
$day = Floor($a/(3600*24))
$hour =Mod(floor($a/3600),24)
$min = Mod(floor(($a-3600*$hour)/60),60)
$sec = $a - (86400* $day)-(3600*$hour) - (60*$min)
MsgBox(0,"", $day & "日"&$hour & "时" & $min & "分"& $sec & "秒"& "__"& $a,1)
WEnd
页:
[1]