Question:
How can I convert a counter’s value from seconds to hours, minutes, and seconds (for example, from 70 seconds to 00h 01min 10seg)?
Solution:
A possible solution is by using this script:
dim H, M, S // String Variables
dim ZH, ZM, ZS // Integer Variables
dim Sec, Result
Sec = TagContSeg
ZH = Int(Sec / 3600)
ZM = Int(Sec / 60) – ZH * 60
ZS = Sec – (ZH * 3600 + ZM * 60)
H = Str(ZH)
M = Str(ZM)
S = Str(ZS)
Result = H + ‘:’ + M + ‘:’ + S
MessageBox(Result)