+ Reply to Thread
Results 1 to 8 of 8

Change hours:minutes:seconds to days

  1. #1
    Registered User
    Join Date
    06-27-2013
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2010
    Posts
    12

    Change hours:minutes:seconds to days

    Hello all,

    I run a report the gives me time taken from start to finish as hhhh:mm:ss. This is almost always greater than 1 day and i would like to show it as days. Normally i would just reformat it as a number but that is not working with this data. ex: the data is stored as '22479:22:22' and reformating it to any data type won't change it. I would like to be able to add and subtract from this number and that is impossible right now. I believe getting that number to = 936.63 would solve my problems.

    Is there a formula or something that i could apply to this?

    thanks

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Change hours:minutes:seconds to days

    Try

    =LEFT(A1,FIND(":",A1)-1)/24

    This will ignore the minutes and seconds though. Is that ok with ya?
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,082

    Re: Change hours:minutes:seconds to days

    What does 22479:22:22 mean to you?
    How many days, hours, minutes, seconds?
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Change hours:minutes:seconds to days

    jwahl16,

    Isn't that 936.6405 (rounded) days when including the minutes and seconds?
    and if the data is always in the format of hhhhh:mm:ss, then this formula should work for you:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Change hours:minutes:seconds to days

    Alternatively,

    =INT(LEFT(A1,FIND(":",A1)-1)/24)+(MOD(LEFT(A1,FIND(":",A1)-1),24)&":"&RIGHT(A1,LEN(A1)-FIND(":",A1)))

  6. #6
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Change hours:minutes:seconds to days

    Another way...
    Please Login or Register  to view this content.

  7. #7
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Change hours:minutes:seconds to days

    =(left(a1,find(":",a1)-1)+(0&right(a1,6)))/24

  8. #8
    Registered User
    Join Date
    06-27-2013
    Location
    Pennsylvania
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Change hours:minutes:seconds to days

    Great thanks everyone! I actually found a different way to get what i needed without that data, but i apreciate all of the fast replies!

+ 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. convert days hours minutes seconds to just minutes
    By hollylynn in forum Excel General
    Replies: 4
    Last Post: 08-28-2015, 08:53 AM
  2. Convert Days:Hours:Minutes:seconds to minutes.
    By Kevingardner1 in forum Excel General
    Replies: 4
    Last Post: 06-03-2014, 06:44 PM
  3. Excel Days , Hours , Minutes and Seconds ( dd hh: mm: ss ) COUNTDOWN
    By kuzna26 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-04-2013, 05:40 PM
  4. Convert days -> Years, Months, Days, Hours, Minutes, Seconds
    By brharrii in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-06-2012, 06:44 PM
  5. Days, hours, minutes and seconds
    By Nunzio in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-24-2008, 07:59 AM

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