+ Reply to Thread
Results 1 to 17 of 17

How to convert milliseconds to general number?

  1. #1
    Registered User
    Join Date
    12-10-2015
    Location
    Hyderabad
    MS-Off Ver
    2013
    Posts
    7

    How to convert milliseconds to general number?

    This problem is frustrating me a lot! I am calculating speed which is speed=distance/ time. The time is in milliseconds. I have tried using second function in excel which returns an integer value. I require the time returned to be in real number so that the speed calculated is more accurate. How do I go about it?

    Kindly have a look in this file to understand my problem.

    Problem.xls

    I am new to this forum, thank You for your patience!
    Last edited by Sid_b23692; 12-10-2015 at 03:08 PM. Reason: SOLVED

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: How to convert milliseconds to general number?

    Can you post a small sample of your data as an Excel sheet. The answer may depend on the format of your actual data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    The paperclip icon
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: How to convert milliseconds to general number?

    Format your cell as general.

    Multiply your number by 1000 to give you seconds.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,169

    Re: How to convert milliseconds to general number?

    Answer supplied

  5. #5
    Registered User
    Join Date
    12-10-2015
    Location
    Hyderabad
    MS-Off Ver
    2013
    Posts
    7

    Re: How to convert milliseconds to general number?

    If you can see the attachment image, The speed=distance/ Second(D6) where the second function is working as SECOND(5.118) as 5. BY this I am loosing accuracy. Could you help me please?

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: How to convert milliseconds to general number?

    A jpg is not a spereadsheet!! Please attach your sheet. We cannot see what is happening in column E!!!

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,169

    Re: How to convert milliseconds to general number?

    What is the distance? why not treat 5.118 as a number (rather than time format)?

  8. #8
    Registered User
    Join Date
    12-10-2015
    Location
    Hyderabad
    MS-Off Ver
    2013
    Posts
    7

    Re: How to convert milliseconds to general number?

    That"s exactly my question sir, how to treat 5.118 as a number? 5.118 was obtained by subtracting two time values and is in format ss.000 . Distance here is in metres and time in seconds so I wish to get the speed in m/s.
    Last edited by Sid_b23692; 12-10-2015 at 02:47 PM.

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: How to convert milliseconds to general number?

    Is there any reason why you are unable to post a sample sheet, as requested. Now even your jpg has vanished!!!

  10. #10
    Registered User
    Join Date
    12-10-2015
    Location
    Hyderabad
    MS-Off Ver
    2013
    Posts
    7

    Re: How to convert milliseconds to general number?

    Sir, In the post you can see a link with problem.xls file. I have uploaded as asked. Kindly see that

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

    Re: How to convert milliseconds to general number?

    If you want your speed in ft/seconds (I assume the 6 in E8 is feet, then

    = 6/ (D8*24*60*60) format cell to general (Result is 1.172333 ft/second
    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

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,002

    Re: How to convert milliseconds to general number?

    There is a link now, but there was not one at the time I posted....

  13. #13
    Registered User
    Join Date
    12-10-2015
    Location
    Hyderabad
    MS-Off Ver
    2013
    Posts
    7

    Re: How to convert milliseconds to general number?

    ThankYou Sir, your solution has worked. Can you kindly explain why the denominator is to be multiplied with 24*60*60?

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

    Re: How to convert milliseconds to general number?

    Excel uses 1 day as the unit of time. That's why you can subtract two dates to get a number of days.

    So to convert what you have formatted as seconds, we multiply * 24 hours/day * 60 Min/hr * 60 Sec/min

    Hope that helps.

  15. #15
    Registered User
    Join Date
    12-10-2015
    Location
    Hyderabad
    MS-Off Ver
    2013
    Posts
    7

    Re: How to convert milliseconds to general number?

    Still not completely clear, never mind. Thanks a ton!!

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

    Re: How to convert milliseconds to general number?

    I didn't explain it very well.

    When you are entering data as time (hh:mm:ss.mmm or any other time format), excel sees this as a fraction of a day. If you formatted 12:00 PM as general, you'd get 0.5 because it's half a day. No matter what it looks like in the cell, it's still 0.5. So in Column D when you subtract two times and format it to ss.000, it's still a fraction of a day. If you divide feet /D8 you will get feet per day not feet per second. To convert days to seconds, you need to multiply as described.

  17. #17
    Registered User
    Join Date
    12-10-2015
    Location
    Hyderabad
    MS-Off Ver
    2013
    Posts
    7

    Re: How to convert milliseconds to general number?

    ThankYou, Learnt something new today. Cheers!

+ 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] How to Convert a General Number to Time
    By EverClever in forum Excel General
    Replies: 5
    Last Post: 10-04-2015, 12:01 PM
  2. Convert General Number To Hours?
    By scarlettw123 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-06-2015, 05:34 PM
  3. [SOLVED] convert general number to date format
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-08-2014, 09:12 AM
  4. [SOLVED] Convert General Number (##:##) to time format (mm:ss)
    By vamosj in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-02-2013, 01:06 PM
  5. Convert time to general number
    By Rmnticjas in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 04-23-2012, 01:28 PM
  6. [SOLVED] how do I convert a general number to a time format?
    By doveness in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-25-2006, 07:45 PM
  7. [SOLVED] General Number field has 19820431. How to convert to 04/31/1982?
    By Leigh in forum Excel General
    Replies: 6
    Last Post: 03-23-2006, 02:45 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