Calculate Hours

B

BigFish311

I need a formula to calculate the number of hours a truck has been
parked. There is a format already setup in excel that I must use.
There are 4 fiels Date In, Time In, Date Out, Time Out that the
formula must use to calculate the hours. The other catch is that they
pay no more than 10 hours a day. So in this scenario they parked
9/20/08 at 8pm and stayed till 9/25 at 3am the total hours would be 47.
 
P

Peo Sjoblom

Try this

formatted as general or number


=(INT((Date_Out+Time_Out)-(Date_In+Time_In))*10)+(24*MOD(((Date_Out+Time_Out)-(Date_In+Time_In)),1))

will return 47

--


Regards,


Peo Sjoblom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top