回 帖 发 新 帖 刷新版面

主题:怎么把秒转换成时,分,秒的格式啊

怎么把秒转换成时,分,秒的格式啊,
比如80秒,要转换成00:01:20这种格式,

回复列表 (共1个回复)

沙发

<%
dim s1,h,m,s
s1=80 '秒数
h=s1\3600
if h>=0 and h<10 then h="0"&h
m=(s1\60) mod 60
if m>=0 and m<10 then m="0"&m
s=s1 mod 60
if s>=0 and s<10 then s="0"&s
response.write h&":"&m&":"&s
%>

我来回复

您尚未登录,请登录后再回复。点此登录或注册