+ Reply to Thread
Results 1 to 5 of 5

Extract milliseconds, seconds and minutes from time difference value (Rounded down)

  1. #1
    Registered User
    Join Date
    11-18-2020
    Location
    Nicaragua
    MS-Off Ver
    EXCEL V16.39
    Posts
    21

    Extract milliseconds, seconds and minutes from time difference value (Rounded down)

    Hello,

    I am having trouble with an issue regarding a time-difference value. After I calculate the difference between two timestamps, I try to convert the entire value to seconds. Then, I multiply the total number of seconds by 240 (irrelevant, but will help explain what might look erroneous in the table). In the highlighted cells, you can observe that the standard formula to convert time to seconds grossly overestimates the value. Can someone please help me extract specifically the milliseconds seconds and minutes out of the time differences observed in the lower table, so that I can manipulate them thereafter? I am especially keen on making sure the minutes/seconds values don't round up, as it would make the total number of seconds inaccurate.

    Thank you!
    Attached Files Attached Files

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

    Re: Extract milliseconds, seconds and minutes from time difference value (Rounded down)

    In C9, for example, try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    This removes the hours from the value in A9
    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

  3. #3
    Registered User
    Join Date
    11-18-2020
    Location
    Nicaragua
    MS-Off Ver
    EXCEL V16.39
    Posts
    21

    Re: Extract milliseconds, seconds and minutes from time difference value (Rounded down)

    Hi ChemistB,

    After implementing your formula, it would appear my excel sheet works.
    I will try a few more analyses and get right back to you.
    Thank you very much.

  4. #4
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Extract milliseconds, seconds and minutes from time difference value (Rounded down)

    If you mean cell C9, cell A9 is 2 minutes (120 second) 41.85 seconds, so 161.45 seconds. If what you want is seconds within minutes, you need to use

    =INT(MOD(CONVERT(A9,"d","s"),60))

    that is, convert the time in A1 to total seconds, then take the remainder of total seconds divided by 60, so seconds within minute, and strip off the fractional part.

    More completely, see the bottommost table in the attached worksheet below.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    11-18-2020
    Location
    Nicaragua
    MS-Off Ver
    EXCEL V16.39
    Posts
    21

    Re: Extract milliseconds, seconds and minutes from time difference value (Rounded down)

    Hi All,

    Both solutions are effective. I genuinely appreciate the support.
    I will mark this as solved and Add Rep.

    Best Regards,
    Mr. Zulu

+ 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] Converting minutes, seconds and milliseconds to a decimal value in seconds
    By Excel_Arate in forum Excel Formulas & Functions
    Replies: 27
    Last Post: 08-30-2020, 02:17 PM
  2. Formatting in Minutes, Seconds and Milliseconds only
    By amanda_m_wilson in forum Excel General
    Replies: 7
    Last Post: 06-14-2016, 12:09 AM
  3. formatting minutes, seconds, milliseconds
    By sandib in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-25-2015, 10:23 AM
  4. Replies: 2
    Last Post: 03-16-2012, 06:51 AM
  5. Replies: 4
    Last Post: 12-22-2010, 12:30 PM
  6. minutes and seconds to seconds and milliseconds
    By nicolajohnson in forum Excel General
    Replies: 5
    Last Post: 06-21-2010, 09:29 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