Author Message

I have a table that contains a time field and I need to add up the
times.  When I do this, the time rolls over at 12:00:00.  I posted this
a few months ago and was unsuccessful with the answers I received.

00:12:00
01:12:00
05:50:00
06:45:13
12:09:12
00:45:45
03:12:00
03:00:10

Thanks.

Bryan

Sent via Deja.com http://www.*-*-*.com/

Sun, 05 Jan 2003 03:00:00 GMT
Bryan,
You are viewing fractional numbers formatted as time.
Time          Value
Quote:
> 00:12:00    0.008333
> 01:12:00    0.050000
> 05:50:00    0.243056
> 06:45:13    0.281400
> 12:09:12    0.506389
> 00:45:45    0.031771
> 03:12:00    0.133333
> 03:00:10    0.125116

You can add these like any other numbers. Your sum will be expressed in
number of days. For instance 1.379398 = about 1 and 1/3 days.

Duane

Quote:
> I have a table that contains a time field and I need to add up the
> times.  When I do this, the time rolls over at 12:00:00.  I posted this
> a few months ago and was unsuccessful with the answers I received.

> 00:12:00
> 01:12:00
> 05:50:00
> 06:45:13
> 12:09:12
> 00:45:45
> 03:12:00
> 03:00:10

> Thanks.

> Bryan

> Sent via Deja.com http://www.deja.com/

Sun, 05 Jan 2003 03:00:00 GMT
Thanks Duane!

Do you know how I can reformat the fraction back into hh/nn/ss?
We have a series of tests that take a certain amount of time to
run and I need to calculate run times for selected tests.  Any
suggestions?

Bryan

Quote:
> Bryan,
> You are viewing fractional numbers formatted as time.
>     Time          Value
> > 00:12:00    0.008333
> > 01:12:00    0.050000
> > 05:50:00    0.243056
> > 06:45:13    0.281400
> > 12:09:12    0.506389
> > 00:45:45    0.031771
> > 03:12:00    0.133333
> > 03:00:10    0.125116
> You can add these like any other numbers. Your sum will be expressed
in
> number of days. For instance 1.379398 = about 1 and 1/3 days.

> Duane

> > I have a table that contains a time field and I need to add up the
> > times.  When I do this, the time rolls over at 12:00:00.  I posted
this
> > a few months ago and was unsuccessful with the answers I received.

> > 00:12:00
> > 01:12:00
> > 05:50:00
> > 06:45:13
> > 12:09:12
> > 00:45:45
> > 03:12:00
> > 03:00:10

> > Thanks.

> > Bryan

> > Sent via Deja.com http://www.deja.com/

Sent via Deja.com http://www.deja.com/

Sun, 05 Jan 2003 03:00:00 GMT
Bryan,
Maybe someone has written a conversion function for this but all I could
find in my "stuff" was a conversion from Hours Decimal to Hours Minutes. You
could use this function and simply multiply by 24 since there are 24 hours
in a day. ( I added the line for you)

Function HrsDec2HrsMins(pvarHrsDec As Variant) As Variant
If IsNull(pvarHrsDec) Then
HrsDec2HrsMins = Null
Exit Function
End If
Dim intHrs As Integer
Dim intMin As Integer
'the next line actually converts the functio to DaysDec2HrsMins
pvarHrsDec = pvarHrsDec * 24  'convert from days to hours
pvarHrsDec = pvarHrsDec + 0.000000001  'gets rid of floating pt errors
intHrs = Int(pvarHrsDec)
intMin = Int((pvarHrsDec - intHrs) * 60)
HrsDec2HrsMins = intHrs & ":" & Format(intMin, "00")
End Function

Quote:
> Thanks Duane!

> Do you know how I can reformat the fraction back into hh/nn/ss?
> We have a series of tests that take a certain amount of time to
> run and I need to calculate run times for selected tests.  Any
> suggestions?

> Bryan

> > Bryan,
> > You are viewing fractional numbers formatted as time.
> >     Time          Value
> > > 00:12:00    0.008333
> > > 01:12:00    0.050000
> > > 05:50:00    0.243056
> > > 06:45:13    0.281400
> > > 12:09:12    0.506389
> > > 00:45:45    0.031771
> > > 03:12:00    0.133333
> > > 03:00:10    0.125116
> > You can add these like any other numbers. Your sum will be expressed
> in
> > number of days. For instance 1.379398 = about 1 and 1/3 days.

> > Duane

> > > I have a table that contains a time field and I need to add up the
> > > times.  When I do this, the time rolls over at 12:00:00.  I posted
> this
> > > a few months ago and was unsuccessful with the answers I received.
> > > Please tell me how I could add the following:

> > > 00:12:00
> > > 01:12:00
> > > 05:50:00
> > > 06:45:13
> > > 12:09:12
> > > 00:45:45
> > > 03:12:00
> > > 03:00:10

> > > Thanks.

> > > Bryan

> > > Sent via Deja.com http://www.deja.com/
> > > Before you buy.

> Sent via Deja.com http://www.deja.com/