+ Reply to Thread
Results 1 to 4 of 4

difference in milliseconds between time values

  1. #1
    Registered User
    Join Date
    12-30-2010
    Location
    athens
    MS-Off Ver
    Excel 2003
    Posts
    1

    difference in milliseconds between time values

    Hello. I have imported from a file 2 columns with timevalues (like 19:27:22.480415) and I want to calculate and display their difference in milliseconds (or microseconds don't mind)/
    How I can do that?

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: difference in milliseconds between time values

    Could you post a sample file ?

    XL will only work to .000 in terms of ms so I'm unsure as to how you have the value you have unless it's stored as text (rather than number).

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: difference in milliseconds between time values

    If your data is text-formatted then with start time in A2 and end time in B2 this will give the difference in milliseconds [ignores last 3 digits]

    =(LEFT(B2,12)-LEFT(A2,12))*86400000

    or for microseconds

    =(LEFT(B2,12)-LEFT(A2,12))*86400000000+RIGHT(B2,3)-RIGHT(A2,3)

    In both cases format result cell as general

    I assume that you'll always have leading zeroes on the hours......and always 6 decimal places
    Audere est facere

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: difference in milliseconds between time values

    As an example, and assuming that the input values are always in exactly hh:mm:ss.000000 format

    Please Login or Register  to view this content.
    B2 is the difference in ms.
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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