The Computer Oracle

How to get time difference as minutes in Excel?

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Lost Civilization

--

Chapters
00:00 How To Get Time Difference As Minutes In Excel?
00:44 Answer 1 Score 0
00:53 Accepted Answer Score 23
01:20 Answer 3 Score 13
01:24 Answer 4 Score 17
02:29 Thank you

--

Full question
https://superuser.com/questions/89045/ho...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#microsoftexcel #worksheetfunction #datetime

#avk47



ACCEPTED ANSWER

Score 23


Just set the cell to be shown in numerical format and it will show a decimal number.

The integer part corresponds to the date value (i.e. the day) and the decimal part to the time of the day.

If you multiply the numerical value of 1:45 (which is 0,07) by 24x60 (the number of hours in a day and the number of minutes in an hour) you will obtain the value in minutes of your cell (105).




ANSWER 2

Score 17


Just format your cell as [mm].

The square brackets around the mm tell Excel to show the total rather than what would be shown if you took the total hours off. The brackets also force Excel to interpret mm as minutes, not as the month. (Without the brackets, m and mm refer to the month if not preceded by h or hh for hours or followed by ss for seconds.)

So, where 1:45:00 with format mm:ss would ignore the hours and show 45:00, both [m]:ss and [mm]:ss will show as 105:00, and both [m] and [mm] would show 105 (where m and mm would show 12, being the month of Excel's default date, which is December 31, 1899).

This also works for hours and seconds. Like 27:10:59 with h:mm would show 3:10, but both [h]:mm and [hh]:mm show 27:10, while both [h] and [hh] show 27. And s would show 59, but [s] gives 97859.




ANSWER 3

Score 13


I think this will work:

  • A1 6:23
  • B1 8:23
  • C1 =(B1-A1)*24*60

Just make sure you format C1 as "General"




ANSWER 4

Score 0


Just format your C cell as hh:mm.