Outline ·
[ Standard ] ·
Linear+
Time Interval, ASP
TStpk1031
|
Feb 24 2006, 02:48 PM, updated 19y ago
|
|
guys... i need to create time interval like the following :
0000 0030 0100 0130 0200 0230 ....
is there any fastest way to create this?
my current idea is
a= cint(starttime) +30
if right(a,2) >=60 then will -30 and +100 end if
but this way sounds stupid....any pro way?...
p/s : just like the date...i can cdate(date)+1 ....,....
thanx in advance..
This post has been edited by tpk1031: Feb 24 2006, 02:55 PM
|
|
|
|
viking81
|
Feb 24 2006, 03:05 PM
|
New Member
|
for the odd iteration, add 30 for the even iteration, add 70
then pad with 0 in front
now u get 0000, 0030, 0100, 0130, 0200...
|
|
|
|
TStpk1031
|
Feb 24 2006, 03:18 PM
|
|
this is what i did :
starttime= 0 do until starttime > 2400 if right(starttime,2)>="60" then starttime = starttime - 60 + 100 end if %> <tr> <td height="32" align="right" class="tab-header"><%=right("0000"&starttime,4)%> </td> <td colspan="4"><%=getfunction()%></td> </tr> <% starttime=starttime+30 loop
|
|
|
|