ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Difference in two times over days (https://www.excelbanter.com/excel-worksheet-functions/86995-difference-two-times-over-days.html)

SouthAfricanStan

Difference in two times over days
 
Each of A1 (time out) and E1(time returned) are in the custom format of
yyyy/mm/dd/ hh:mm
I need to calculate two results, for a car hire company:
1. The total time difference as days;hours;minutes.
Some clients are charged per day and if the vehicle is returned later than
one hour after a 24 (or multiple of 24) hour period then the client is
charged an additional full day's rate. eg if a vehicle has been used for 3
days and one hour (or less than one hour), the charge is for 3 days, but if
for 3 days and more than one hour the charge is for four days. In view of
this requirement:
2. The total time difference as days;hours
Any help will be appreciated.



JE McGimpsey

Difference in two times over days
 
One way:

=INT(E1-A1) & " days; " & TEXT(E1-A1,"hh") & " hours"

In article ,
"SouthAfricanStan" <me@there wrote:

Each of A1 (time out) and E1(time returned) are in the custom format of
yyyy/mm/dd/ hh:mm
I need to calculate two results, for a car hire company:
1. The total time difference as days;hours;minutes.
Some clients are charged per day and if the vehicle is returned later than
one hour after a 24 (or multiple of 24) hour period then the client is
charged an additional full day's rate. eg if a vehicle has been used for 3
days and one hour (or less than one hour), the charge is for 3 days, but if
for 3 days and more than one hour the charge is for four days. In view of
this requirement:
2. The total time difference as days;hours
Any help will be appreciated.



All times are GMT +1. The time now is 06:01 PM.

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