Substract 2 "yyyy/mm/dd hh:mm:ss" to obtain duration in "hh:mm:ss"

HI everyone!

I'm new to the forum and need some urgent help with analyzing my master's thesis data. I've stumbled across the following problem and don't find a solution anywhere on the web.... :s

I have to calculate the duration of certain events using both date and time, since some can span from the evening of one day to the morning of the next, for example: "2012/01/01 22:00:00" to "2012/01/02 04:00:00".

So basically I would need to subtract the two values to get a duration. The format of the result could be "hh:mm:ss" (eg. "01:30:00" for one and a half hours) or simply as "1.5 hours" or "90 minutes" or "5400 seconds" (would be nice to know how to obtain all of these).

Calculation is something like this:

"2012/01/01 22:00:00" - "2012/01/02 04:00:00" = "06:00:00" or "6" or "360" or "21600"

hmmm... dunno if I've explained myself well but really hope there's someone out there that can help me with this since I'm pretty much stuck... :S :S :S

Million thanks!

Ana =)

Nick's picture

simply subtract the 2 values,

simply subtract the 2 values, and format the cell how you want to see it..

If you format the result as a number, it will display fractions of day

so 1.5 = 1 day, 12 hours

take a look here for more info:
http://excelexperts.com/Teach-Yourself-Excel-Lesson-12-Dates