C
|
clig 2/17/2007 |
I've got some fields (Access DB) that are currently basic text fields in the DB but ASPRunner is formatting them as Time fields. Therefore I can enter 00.10.30 and it shows 00:10:30 What I want to do is to enter an elapsed time here and then deduct one time from the other as a result in a but I'm not sure if I can do this using a time field. Specifically it's for a race, therefore I've got a start time and a finish time with 4 other times in between. All the timekeepers start their stopwatches at the same time and when the first times come in it will be in the format: Competitor No. 153 = 00.15.03 (i.e 15 minutes 3 seconds from the moment we all started our watches) Later I'll get 153 again 00.23.33 so I'll know that the first section took him 8 minutes 30 seconds. I'll be creating new table views to enter this data and view it but I want to understand first if it's possible. I've read in this forum about problems with time formats in previous versions. For example, would I need to convert 00:15:03 into a number of seconds (903), deduct that from 00:23:33 (1413) and then display the result as seconds divided into hh:mm:ss i.e. 00:08:30 Two issues potentially: times could go up to say 6 hours (06:01:30) and the results could include totals of up to 4 or 5 hours (04:12:00) Bob Build 225
|
C
|
clig 2/24/2007 |
intT1 = dict("Time1") intT2 = dict("Time2") intHr1 = Cint(MID(intT1,1,2)) intMin1 = Cint(MID(intT1,4,2)) intSec1 = Cint(MID(intT1,7,2)) intHr2 = Cint(MID(intT2,1,2)) intMin2 = Cint(MID(intT2,4,2)) intSec2 = Cint(MID(intT2,7,2)) intTime = (intHr2 - intHr1) & "." & (intMin2 - intMin1) & "." & (intSec2 - intSec1) Session("intTotal") = intTime Response.Write "Calculation: " & Session("intTotal") Calculation: 0.8.30
|
G
|
grinningdog author 2/25/2007 |
Thanks very much. I'll get back on the case!! <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=15801&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' /> |