calculating with time


Posted by D.F. van der Pant on October 23, 2001 1:36 AM

start end hours
13:30 17:00 ?

Hello, I am looking for the way to calculate the number of hours from start to end. This number of hours I then want to use in other formulas.
Thanks.

Posted by Johnny Knoxville on October 23, 2001 1:54 AM

Can you be more specific what you want? Do you wanna calculate the difference between 13:30 til 17:00 so that the answer will be 3 hours or 3:30? Or am I thinking all wrong?

Posted by Aladin Akyurek on October 23, 2001 2:08 AM

Use one of

=B2-A2 [1]

=MOD(B2-A2,1) [2]

The first will suffice if start and end times fall in the same day. If these "work" times spans midnight.

Custom format the cell where you compute elapsed time as [h]:mm.

Aladin

=========

Posted by D.F. van der Pant on October 23, 2001 3:18 AM

Hello Johnny, I want the number of hours to result in 3,5 and then I want to multiply it in another formula with another number.Thanks for your reply.


Posted by Aladin Akyurek on October 23, 2001 3:23 AM

Try: =(B1-A1)*24. (NT)


Posted by D.F. van der Pant on October 23, 2001 3:53 AM

Re: thanks Aladin




Posted by Johnny on October 23, 2001 3:56 AM

If you put 13:30 in cell A1 and 17:00 in B1 and the number you wanna multiply it with in C1 then put in the cell you want the answer to this formula for example cell D1 the following formula:

=B1-A1*C1