+ Reply to Thread
Results 1 to 2 of 2

Difference in two times over days

Hybrid View

  1. #1
    SouthAfricanStan
    Guest

    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.



  2. #2
    JE McGimpsey
    Guest

    Re: Difference in two times over days

    One way:

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

    In article <#s$sH8$bGHA.3956@TK2MSFTNGP05.phx.gbl>,
    "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.


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1