+ Reply to Thread
Results 1 to 9 of 9

date/time formatting to show total days, hours, minutes and seconds past in one field

  1. #1
    Registered User
    Join Date
    05-02-2017
    Location
    england
    MS-Off Ver
    2013
    Posts
    11

    date/time formatting to show total days, hours, minutes and seconds past in one field

    I have tried a number of different ways to format a field which would show the total days, hours, minutes and seconds from a range (see attached) it seems as though the field will not accept any number above 30/31 days I expect. Any help would be greatly appreciated. thanks in advance.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by barber87; 05-05-2017 at 11:20 AM.

  2. #2
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Re: date/time formatting to show total days, hours, minutes and seconds past in one field

    I don't think excel supports that (just doing it with formatting) you probably need to write a formula.
    If you want something done right... find a forum and ask an online expert.

    Time flies like an arrow. Fruit flies like a banana.

  3. #3
    Registered User
    Join Date
    05-02-2017
    Location
    england
    MS-Off Ver
    2013
    Posts
    11

    Re: date/time formatting to show total days, hours, minutes and seconds past in one field

    Thanks, any clues a to what sort of formula would be best to use.

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,907

    Re: date/time formatting to show total days, hours, minutes and seconds past in one field

    Try this ...

    =INT(SUM(B5:B87))&" days, "&TEXT(SUM(B5:B87),"hh"" hours, ""mm"" minutes and ""ss"" seconds""")

  5. #5
    Registered User
    Join Date
    05-02-2017
    Location
    england
    MS-Off Ver
    2013
    Posts
    11

    Re: date/time formatting to show total days, hours, minutes and seconds past in one field

    Phuocam thank you so much that has worked perfectly, really appreciate it

  6. #6
    Registered User
    Join Date
    05-02-2017
    Location
    england
    MS-Off Ver
    2013
    Posts
    11

    Re: date/time formatting to show total days, hours, minutes and seconds past in one field

    I have taken the Formula that was suggested above and amended this slightly to fit the full worksheet i am using. I now need a way to make sure that empty cells are not included in the total count as the total I now have seems far to large to not include these.

    =INT(SUM(E:E))&" days, "&TEXT(SUM(E:E),"hh"" hours, ""mm"" minutes and ""ss"" seconds""")

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,544

    Re: date/time formatting to show total days, hours, minutes and seconds past in one field

    I think that I see the problem(s), providing column E in the actual data is set up like column B in the sample attached to post #1.
    1) the sum includes today's date, which excel actually records as being 42865 (the number of days since 1/1/1900)
    2) each entry in column B displays an offset number of days, that is if the current date is the 5th (as in the sample file) and the status date is the 22nd then the backlog displays 13 (cell B5) although there are actually 43 days between May 5th and March 22nd.
    This proposed solution applies the following variation of Phuocam's formula to column B:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    It employs a helper column (C) populated by the formula: =IF(B5<>"",B$3-A5,0)
    The formula that displays the total is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  8. #8
    Registered User
    Join Date
    05-02-2017
    Location
    england
    MS-Off Ver
    2013
    Posts
    11

    Re: date/time formatting to show total days, hours, minutes and seconds past in one field

    Thank you JeteMC that works great. I just need to transfer this to the full workbook and tweak some cell references but should work great. Thanks again.

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,544

    Re: date/time formatting to show total days, hours, minutes and seconds past in one field

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools link above your first post. I hope that you have a blessed day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Excel time formatting (hours, minutes, seconds)
    By johncena69 in forum Excel General
    Replies: 3
    Last Post: 01-02-2017, 12:52 AM
  2. convert days hours minutes seconds to just minutes
    By hollylynn in forum Excel General
    Replies: 4
    Last Post: 08-28-2015, 08:53 AM
  3. Convert Days:Hours:Minutes:seconds to minutes.
    By Kevingardner1 in forum Excel General
    Replies: 4
    Last Post: 06-03-2014, 06:44 PM
  4. Replies: 1
    Last Post: 11-02-2011, 06:50 PM
  5. Replies: 1
    Last Post: 11-02-2011, 06:44 PM
  6. Replies: 6
    Last Post: 12-22-2010, 07:23 AM
  7. Replies: 1
    Last Post: 06-01-2006, 08:50 AM

Tags for this Thread

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