主题:怎么把秒转换成时,分,秒的格式啊
huangyu_00007
[专家分:0] 发布于 2007-12-24 13:50:00
怎么把秒转换成时,分,秒的格式啊,
比如80秒,要转换成00:01:20这种格式,
回复列表 (共1个回复)
沙发
tianyu123 [专家分:2570] 发布于 2007-12-25 17:58:00
<%
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
%>
我来回复