Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

calculate the difference between two dates and time on excel

Tags:

datetime

excel

I want to calculate the difference between two dates and time and the result should be on "hh:mm:ss"

   |           E          |           F         |    G     |
===+======================+=====================+==========+
3  | 01/01/2013  13:34:50 | 31/01/2013  7:34:05 | 17:59:15 |

I tried this =TEXT(F3-E3;"hh:mm:ss") but it only count the difference from times, not date. I also tried to add dd like this: =TEXT(F3-E3;"dd hh:mm:ss") It works, but that's not the result I'm looking for.

like image 363
Darjeeling Avatar asked Mar 05 '14 02:03

Darjeeling


2 Answers

I think this is what you want:

=TEXT(F3-E3;"[h]:mm:ss")
like image 138
Doug Glancy Avatar answered Sep 30 '22 02:09

Doug Glancy


I think the semicolon should be replaced with a comma:

=TEXT(E5-D5,"[h]:mm:ss")
like image 43
user9195988 Avatar answered Sep 30 '22 01:09

user9195988