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 Chris Miller 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 hours difference between two hours of the day 1

Status
Not open for further replies.

thelordoftherings

Programmer
May 16, 2004
616
IL
Hello,

I have two cells, each one contains an hour of the day (for example: 09:15, 17:35). Assuming these two values represent hours of the same day, how can I calculate the time difference between them (from example: the difference between 09:00 and 17:25 is 8 hours and 25 minutes).


 
or just

=T14-U14

and format as h:mm:ss

no need to make it text
 


Hi,

FYI...

Why do Dates and Times seem to be so much trouble? faq68-5827

To emphasize what xlbo stated, avoid converting TimeValues to TEXT, especially if you will be using this converted value in calculations, sorts, charts, pivot tables and the like.

Skip,
[sub]
[glasses] [red]Be Advised![/red] The Vinyards of Texas have produced a wine with diuretic dimishment and urethric relief...
Pinot More![tongue][/sub]
 
Ya know what Skip, sometimes I wonder if anyone ever reads the FAQ and good bits that people have left here.

I see over and over this question and your reply.

Thank you for your patience.

Cheers
Wicca
 
Dear Skip,

I've read the FAQ, this is why I've replyed that I have the answer. I know the TEXT could be a problem but in my case it is not relevant.

Dear Wicca,

Read the answer to Skip above and you'll see I do read them. Please, give me some credit...
 
One of the most comprehensive sources of info for dates and times on the web:-


Regards
Ken..........

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top