# Difference between dates and times

#### Diving_Dan

##### Board Regular
I've got an excel sheet where dates and times are put into the sheet via a userform. I am trying to work out the difference in hours and minutes between a date in a cell & time in another cell and the date and time in 2 other cells. I tried the following formula.
Excel Formula:
``=TEXT(([@[Date leave]]+[@[Time leave]])-([@[Date arrived]]+[@[Time arrived]]),"HH:MM")``
Is it possible to do this or would I need to have the date and time in a single cell rather than split across two different cells?

Any help will be appreciated

### Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

#### GWteB

##### Well-known Member
With a formula like this you only calculate the difference in clock hours (not the actual hours). The difference in days is not taken into account, so an actual difference of 26 hours would result in 02:00. As it is unlikely to travel back in time, I would advise subtracting the Leaves from the Arrives.

Replies
3
Views
113
Replies
5
Views
81
Replies
5
Views
188
Replies
1
Views
85
Replies
17
Views
732

1,126,957
Messages
5,621,823
Members
415,859
Latest member
Vain

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back