Function StoHMS(Seconds As Long) As String
Dim H, M, S As Integer
Dim sH, sM, sS As String
S = Seconds Mod 60
M = Int(Seconds / 60) Mod 60
H = Int(Seconds / 3600)
If S < 10 Then sS = "0" + CStr(S) Else sS = CStr(S)
If H < 10 Then sH = "0" + CStr(H) Else sH = CStr(H)
If M < 10 Then sM = "0" + CStr(M) Else sM = CStr(M)
StoHMS = sH + ":" + sM + ":" + sS
End Function
dim secondCount as long
dim second as integer ,minute as integer,hour as long
dim sstr as string
hour=secondcount mod 3600
minute=(secondcount-hour*3600) mod 60
second=secondcount-hour*3600-minute*60
sstr=hour &"小时" & minute & "分" & second & "秒"