Excel – Calculating a duration in excel from date and time

date timemicrosoft excelworksheet-function

I have 2 columns in excel, each column includes a date and a time in the following format: 'dd/mm/yyyy hh:mm'. One is a start date/time, the other is an end date/time. The end date/time could be another day for example. Time is in 24hr clock.

Sample data: 18/12/2012 16:13 | 19/12/2012 01:21

Can anyone help with a formula which can look at each of these columns and produce a total minutes duration between the start time and end time.

I have tried a few already, but having the date in there as well is where I get stuck.

Thank you in advance!

Best Answer

So for your example the number of minutes is 548? You can do a simple subtraction to get total hours/minutes, so if you have start time/date in A2 and end time/date in B2 this formula....

=B2-A2

with result cell formatted as [h]:mm will give you 9:08

to get 548 just multiply by 1440 (number of minutes in a day), i.e.

=(B2-A2)*1440

format result cell as general

Related Question