ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Difference between 2 times and dates (https://www.excelbanter.com/excel-worksheet-functions/27945-difference-between-2-times-dates.html)

Stefan Buijs

Difference between 2 times and dates
 
Hello,

The following problem we have to deal with:

On a sheet we have at cell A1 date number one and cell B1 time in the format
(hh:mm) and at cell A2 date number two en cell B2 time in the format
(hh:mm).
Now we have to calculate the time difference between date en time 1 and 2 in
cell C1.

How can I get this done?




Hi

Try:
=(A2+B2)-(A1+B1)
If you want the result as hours and minutes, format the cell as [h]:mm

--
Andy.


"Stefan Buijs" wrote in message
.nl...
Hello,

The following problem we have to deal with:

On a sheet we have at cell A1 date number one and cell B1 time in the
format
(hh:mm) and at cell A2 date number two en cell B2 time in the format
(hh:mm).
Now we have to calculate the time difference between date en time 1 and 2
in
cell C1.

How can I get this done?






All times are GMT +1. The time now is 09:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com