Welcome Guest ( Log In | Register )

Bump Topic Topic Closed RSS Feed

Outline · [ Standard ] · Linear+

> Time Interval, ASP

views
     
TStpk1031
post Feb 24 2006, 02:48 PM, updated 14y ago

Casual
***
Junior Member
443 posts

Joined: Jan 2003
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
post Feb 24 2006, 03:05 PM

New Member
*
Junior Member
48 posts

Joined: Jan 2006


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
post Feb 24 2006, 03:18 PM

Casual
***
Junior Member
443 posts

Joined: Jan 2003
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

Topic ClosedOptions
 

Switch to:
| Lo-Fi Version
0.0305sec    1.90    5 queries    GZIP Disabled
Time is now: 15th November 2019 - 11:23 PM