Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Formula for Total hours between two date times in ms excel

I need to calculate the total hours and minutes between two dates mentioned in excel. i.e.,

Start date: 02-Sep-2013 02:03:00 AM
End Date: 04-Sep-2013 02:04:00 AM

The answer should be 48:01 h:mm.
Need to consider holidays also, like if 03-Sep-2013 is holiday, then The answer should be 24:01 h:mm.
There are no business hours. It should consider 24 hours. Please help me on this.

like image 581
swa Avatar asked Sep 03 '13 06:09

swa


1 Answers

a simple subtraction will get you the value you want: subtract one date/time from the other, and then subtract the number of holiday dates that fall between the two dates.

the trick is to format the result cell as [h]:mm (this format works for up to 9999 hours)

Here's an example:
enter image description here

like image 85
SeanC Avatar answered Jan 04 '23 05:01

SeanC