+ Reply to Thread
Results 1 to 11 of 11

want convert time from 1217.50 into 12:17:30

  1. #1
    Forum Contributor
    Join Date
    03-24-2007
    Posts
    107

    want convert time from 1217.50 into 12:17:30

    My data is in the wrong format. The first 2 digits are hours. The next 2 are minutes. I would like to put a : in between them

    How do I do this?

    Secondly I would like to convert the decimal minutes into second and put a : between them as well.

    Can anybody help?
    Excel 2007

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: want convert time from 1217.50 into 12:17:30

    Try

    =TIME(MID(A1,1,2),MID(A1,3,2),MID(A1,6,2)*1)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    06-30-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    70

    Re: want convert time from 1217.50 into 12:17:30

    just little modification in fotis1991 ans.
    use this
    =TIME(MID(TEXT(A1,"0000.00"),1,2),MID(TEXT(A1,"0000.00"),3,2),MID(TEXT(A1,"0000.00"),6,2)*6/10)

    in this i assume that after decimal it is go up to 99 so in that case 100 will b count as 60 seconds....
    Last edited by pwnyadav007; 09-07-2013 at 05:19 AM.

  4. #4
    Forum Contributor
    Join Date
    03-24-2007
    Posts
    107

    Re: want convert time from 1217.50 into 12:17:30

    Thank you for your quick response. However I don't know how to use these answers. I'm not a very good programmer

    In cell D9 the number 1217.50 is displayed. I want to keep this figure. however on another part on the spreadsheet I would like to display it as 12:17:30

    Do I write =D9(MID(TEXT(A1,"0000.00"),1,2),MID(TEXT(A1,"0000.00"),3,2),MID(TEXT(A1,"0000.00"),6,2)*6/10)

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: want convert time from 1217.50 into 12:17:30

    No worries! Take a look to the example.
    Attached Files Attached Files

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: want convert time from 1217.50 into 12:17:30

    Ok. Now i got what you need. Use pwnyadav007,s suggested formula.

    See the example.
    Attached Files Attached Files

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: want convert time from 1217.50 into 12:17:30

    =TEXT(INT(A1),"00\:00")+MOD(A1,1)/1440 should do it
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  8. #8
    Forum Contributor
    Join Date
    03-24-2007
    Posts
    107

    Re: want convert time from 1217.50 into 12:17:30

    Quote Originally Posted by pwnyadav007 View Post
    just little modification in fotis1991 ans.
    use this
    =TIME(MID(TEXT(A1,"0000.00"),1,2),MID(TEXT(A1,"0000.00"),3,2),MID(TEXT(A1,"0000.00"),6,2)*6/10)

    in this i assume that after decimal it is go up to 99 so in that case 100 will b count as 60 seconds....
    This works great on a spreadsheet. However it won't work when I add it to my existing spreadsheet. Don't know why

    I'm making a calendar that will find true north. Simply input the longitude and the standard meridian for the timezone

    Example I'm at 96.63 longitude. The standard meridian for this time tone is 90 longitude

    On Jan 1 at 1229.83 a string line on a plumb bob will cast a shadow that points to true north

    I want to keep the existing table with the time of 1229.83. However I want another table that converts this to 12:29:49 (shown in green)

    The formula above works great but for some reason, not on this spreadsheet.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    06-30-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    70

    Re: want convert time from 1217.50 into 12:17:30

    Check this
    Hope this will help u
    Find true north.xlsx

  10. #10
    Registered User
    Join Date
    06-30-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    70

    Re: want convert time from 1217.50 into 12:17:30

    or u can do one thing also in ur previous Find true north worksheet
    select ur formula range T9:AE38
    then press ctrl+1 it will open nuber formatting dialog box
    then go to custom and write this on type [hh]:mm:ss
    press ok and u done
    hope this will help

  11. #11
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: want convert time from 1217.50 into 12:17:30

    i think that formula is slightly inaccurate as 0.83 mins is closer to 50 seconds than 49
    and the actual value in that cell is
    1229.8322976733700
    which is even closer to 50 seconds than 49
    =TEXT(INT(A1),"00\:00")+MOD(A1,1)/1440 gives the correct seconds
    see attached and don't forget to format cells as hh:mm:ss
    Attached Files Attached Files

+ 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. [SOLVED] convert decimal number to time : convert 1,59 (minutes, dec) to m
    By agenda9533 in forum Excel General
    Replies: 22
    Last Post: 09-15-2013, 10:43 AM
  2. Time stored as text. How can I convert to data and time?
    By matthewbutterworth in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-07-2013, 10:19 AM
  3. Replies: 4
    Last Post: 03-31-2006, 08:03 PM
  4. [SOLVED] convert time imported as text to time format for calculations
    By batfish in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-27-2005, 07:05 PM
  5. Replies: 0
    Last Post: 08-23-2005, 12:22 PM

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