Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to calculate the time in excel

Status
Not open for further replies.

jackps

Technical User
Jul 7, 2003
66
0
0
HK
Dear all
I'm trying to find out the time different within two time value,can someone please tell me what formular i can use to calculate the time difference?

Thx alot

Jack
 
if time 1 in A1 and time 2 in B1 then in C1
=B1-A1
format as hh:mm:ss

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
A slightly better format is [h]:mm which shows the elapsed time in hours eg. 25.10 or [mm]:ss which shows the elapsed time in minutes eg. 75:46
If you are comparing cells A1 and A2 with times but cell A1 might be bigger than A2 only sometimes, then the following formula will cover all eventualities:

=IF((A1-A2)>0,(A1-A2),(A2-A1))

Enjoy


Tiglet [reading]

[blue]Living on Earth is expensive, but it does include a free trip around the sun every year.[/blue]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top