Closed Thread
Results 1 to 3 of 3

Adding Days:Hours:Minutes

  1. #1
    Charles Watson
    Guest

    Adding Days:Hours:Minutes

    I have to calculate how long (in day:hours:mins) a certain vehicle is spent
    on different processes. Every quarter I then have to produce a report
    showing the total time on each process, for example on stand-by. If month 1
    it is 17:04:30, Month 2 15:07:30 and month 3 12:08:20 I would expect the
    total to be 44:20:20 (44 days, 20 hours and 20 mins). With the cells
    formatted to dd:hh:mm a value of 14:20:20 is shown - that is the days seem
    to start counting again after 30 is reached. How do I get around this
    problem?

    Thanks in advance.

    Charles



  2. #2
    Ron Rosenfeld
    Guest

    Re: Adding Days:Hours:Minutes

    On Thu, 10 Nov 2005 20:40:52 -0000, "Charles Watson" <[email protected]>
    wrote:

    >I have to calculate how long (in day:hours:mins) a certain vehicle is spent
    >on different processes. Every quarter I then have to produce a report
    >showing the total time on each process, for example on stand-by. If month 1
    >it is 17:04:30, Month 2 15:07:30 and month 3 12:08:20 I would expect the
    >total to be 44:20:20 (44 days, 20 hours and 20 mins). With the cells
    >formatted to dd:hh:mm a value of 14:20:20 is shown - that is the days seem
    >to start counting again after 30 is reached. How do I get around this
    >problem?
    >
    >Thanks in advance.
    >
    >Charles
    >


    The "day" part will "roll over" at 31, so you are going to have to display that
    part manually. I am surprised that you get 14:20:20, I would have expected
    13:20:20.

    I think we have to start at the data entry section.

    How are you actually entering the data? If the data is being entered by
    subtracting StartTimes from EndTimes for each process, then it is probably
    being entered correctly. Other methods will work properly also.

    However, if you are entering it as 2:03:05 and thinking that is the same as 2
    days, 3 hours, 5 minutes, your entries will be incorrect. That entry,
    REGARDLESS of how the cell is formatted, is stored by Excel as the equivalent
    of 2 hours, 3 minutes, 5 seconds.

    Once the data entry is correct, the next step is the display. Excel stores
    times as fractions of days, so 44 days, 20 hours and 20 mins would be stored as

    44 + 20/24 + 20/1440 or 44.8472222...

    To display it in the format you have chosen requires this formula:

    =TEXT(INT(TotTime),"#,##0")&":"&TEXT(MOD(TotTime,1),"hh:mm")

    This will be a text string and will not (easily) be usable in subsequent
    calculations. You will need to keep your original TotTime Sum intact for that.


    --ron

  3. #3
    Nick Hodge
    Guest

    Re: Adding Days:Hours:Minutes

    Charles

    I am not sure of your formatting for Days:Hours:Minutes as that in excel
    will normally signify Hours:Minutes:Seconds, so excel will not understand it
    either.

    Look here for an understanding of dates and times in Excel and I'm sure all
    will become clear

    www.cpearson.com/excel/datetime.htm

    --
    HTH
    Nick Hodge
    Microsoft MVP - Excel
    Southampton, England
    www.nickhodge.co.uk
    [email protected]HIS


    "Charles Watson" <[email protected]> wrote in message
    news:[email protected]...
    >I have to calculate how long (in day:hours:mins) a certain vehicle is spent
    >on different processes. Every quarter I then have to produce a report
    >showing the total time on each process, for example on stand-by. If month 1
    >it is 17:04:30, Month 2 15:07:30 and month 3 12:08:20 I would expect the
    >total to be 44:20:20 (44 days, 20 hours and 20 mins). With the cells
    >formatted to dd:hh:mm a value of 14:20:20 is shown - that is the days seem
    >to start counting again after 30 is reached. How do I get around this
    >problem?
    >
    > Thanks in advance.
    >
    > Charles
    >




Closed 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