+ Reply to Thread
Results 1 to 11 of 11

Time measures in weird format

  1. #1
    Registered User
    Join Date
    11-18-2011
    Location
    Seattle
    MS-Off Ver
    Excel 2007
    Posts
    6

    Time measures in weird format

    hello

    i have an issue with exported data from a Cognos server
    it gives me time format in days:hours:mins but it displays it as 14 11:06 (14 days, 11 hours, 6 mins)
    is there a formula that can be used to convert to [h]:mm

    i have attached an example
    Attached Files Attached Files
    Last edited by andrewmo; 09-21-2012 at 03:38 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Time measures in weird format

    Do you want the days converted to hours? So for 3 days, 5 hours 15 minutes, are you looking for 5:15, or 77:15?
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  3. #3
    Registered User
    Join Date
    11-18-2011
    Location
    Seattle
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Time measures in weird format

    yes, hours please 77:15

  4. #4
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Time measures in weird format

    And do you need to keep that data in the order that it's in?

  5. #5
    Registered User
    Join Date
    11-18-2011
    Location
    Seattle
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Time measures in weird format

    not really, but it would be nice

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Time measures in weird format

    This formula works except when a single value appears (i.e. 42). Is that 42 days? hours? minutes?

    =IF(ISNUMBER(SEARCH(" ",C2)),TRIM(LEFT(C2,2))+TIMEVALUE(RIGHT(C2,LEN(C2)-SEARCH(" ",C2))),TIMEVALUE(C2))
    Format cells as [h]:mm or [hh]:mm
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

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

  7. #7
    Registered User
    Join Date
    11-18-2011
    Location
    Seattle
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Time measures in weird format

    oh yeah, good point, i believe when it's just a single number it's suppose to be minutes

    thanks, i will give it a try!

  8. #8
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Time measures in weird format

    Lots of things would be nice This is going to involve some grunt work - once I figure out the best way to do this, I'll change a column, and you can do the rest yourself. There's no formula as such that I'm aware of, but bear with me.....



    EDIT: Orrrrrr, someone who really knows their stuff could come along and show us the proper way to do it. Cheers, ChemistB.

  9. #9
    Registered User
    Join Date
    11-18-2011
    Location
    Seattle
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Time measures in weird format

    Yep, that did it. Thank you BB1972 and ChemistB!!!

  10. #10
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Time measures in weird format

    LOL, save it for ChemistB, in fairness! Glad you're sorted.

  11. #11
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Time measures in weird format

    If the whole numbers are minutes

    =IF(ISNUMBER(SEARCH(":",C2)),IF(ISNUMBER(SEARCH(" ",C2)),TRIM(LEFT(C2,2))+TIMEVALUE(RIGHT(C2,LEN(C2)-SEARCH(" ",C2))),TIMEVALUE(C2)),TEXT(C2/(24*60),"hh:mm")+0)

    Glad to help. Thanks Brendan.

+ 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