这个能不能用循环语句?

这个能不能用循环语句?
想做个时间差的显示,显示时:分
下面能否用循环语句,
Geth=rs("tihuo_time")
Gethh=now()
Getsnn=DateDiff("n",Geth,Gethh)
if Getsnn60 then
Getcnn=DateDiff("n",Geth,Gethh)-60
Getchh=1
end if
if Getsnn>120 then
Getcnn=DateDiff("n",Geth,Gethh)-120
Getchh=2
end if
if Getsnn>180 then
Getcnn=DateDiff("n",Geth,Gethh)-180
Getchh=3
end if
if Getsnn>240 then
Getcnn=DateDiff("n",Geth,Gethh)-240
Getchh=4
end if
if Getsnn>300 then
Getcnn=DateDiff("n",Geth,Gethh)-300
Getchh=5
end if
if Getsnn>360 then
Getcnn=DateDiff("n",Geth,Gethh)-360
Getchh=6
end if
if Getsnn>420 then
Getcnn=DateDiff("n",Geth,Gethh)-420
Getchh=7
end if
if Getsnn>480 then
Getcnn=DateDiff("n",Geth,Gethh)-480
Getchh=8
end if
if Getsnn>540 then
Getcnn=DateDiff("n",Geth,Gethh)-540
Getchh=9
end if
if Getsnn>600 then
Getcnn=DateDiff("n",Geth,Gethh)-600
Getchh=10
end if
if Getsnn>660 then
Getcnn=DateDiff("n",Geth,Gethh)-660
Getchh=11
end if
if Getsnn>720 then
Getcnn=DateDiff("n",Geth,Gethh)-720
Getchh=12
end if
if Getsnn>780 then
Getcnn=DateDiff("n",Geth,Gethh)-780
Getchh=13
end if
if Getsnn>840 then
Getcnn=DateDiff("n",Geth,Gethh)-840
Getchh=14
end if
if Getsnn>900 then
Getcnn=DateDiff("n",Geth,Gethh)-900
Getchh=15
end if
if Getsnn>960 then
Getcnn=DateDiff("n",Geth,Gethh)-960
Getchh=16
end if
if Getsnn>1020 then
Getcnn=DateDiff("n",Geth,Gethh)-1020
Getchh=17
end if
if Getsnn>1080 then
Getcnn=DateDiff("n",Geth,Gethh)-1080
Getchh=18
end if
if Getsnn>1140 then
Getcnn=DateDiff("n",Geth,Gethh)-1140
Getchh=19
end if
if Getsnn>1200 then
Getcnn=DateDiff("n",Geth,Gethh)-1200
Getchh=20
end if
if Getsnn>1200 then
Getcnn=0
Getchh=DateDiff("h",Geth,Gethh)
end if
Getch=Getchh&" :"&Getcnn
在ASP中
数学人气:891 ℃时间:2020-02-05 07:40:21
优质解答
if Getsnn<60 then  Getcnn=DateDiff("n",Geth,Gethh)  Getchh=0  end if  for i=1 to 20if Getsnn>60*i then&n...
我来回答
类似推荐
请使用1024x768 IE6.0或更高版本浏览器浏览本站点,以保证最佳阅读效果。本页提供作业小助手,一起搜作业以及作业好帮手最新版!
版权所有 CopyRight © 2012-2024 作业小助手 All Rights Reserved. 手机版