+ Reply to Thread
Results 1 to 7 of 7

Need help converting time to seconds

  1. #1
    Registered User
    Join Date
    10-17-2018
    Location
    Kentucky
    MS-Off Ver
    Excel 2016
    Posts
    3

    Need help converting time to seconds

    I have a spreadsheet with start and end time columns. I can use the =sum function to derive the time between start and end time, and the custom format for the result column as (mm, ss), this works.
    The problem I have is I now way to chart these "duration's" and am not having a lot of luck. Is there a way to convert these results into just seconds?

  2. #2
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,198

    Re: Need help converting time to seconds

    yes a day is 1
    an hour = 1/24
    a minute 1/(24*60)
    a second (1/(24*60*60)

    so format as a number and mulitiply by 24*60*60 =86400

  3. #3
    Registered User
    Join Date
    10-17-2018
    Location
    Kentucky
    MS-Off Ver
    Excel 2016
    Posts
    3

    Re: Need help converting time to seconds

    Thank you for your reply.

    If I format as a number the results show up as "0". If I format as custom mm, the results display correctly, but still do not calculate with the suggested formula.
    Snip1.JPG
    Snip2.JPG

  4. #4
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Need help converting time to seconds

    Hi,

    First of all, you don't need SUM, otherwise, don't understand why you're having problems, result cells formatted General:

    Excel 2016 (Windows) 64 bit
    C
    D
    E
    F
    1
    10/16/2018 14:26
    10/16/2018 14:28
    120
    2
    10/17/2018 14:26
    10/17/2018 14:28
    02:00
    120
    Sheet: Sheet105

    Excel 2016 (Windows) 64 bit
    E
    F
    1
    =(D1-C1)*86400
    2
    =D2-C2
    =E2*86400
    Sheet: Sheet105

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Need help converting time to seconds

    Just FYI,
    a date is just a number representing the number of days passed since 1/1/900...and then formatted in a way that we recognize as a date. So, for instance, today (Thu 18 Oct 2018) is actually 43391

    Time is actually a decimal part of 1 (day), so 06:00 AM is 0.25, 12 noon is 0.5 and 18:00 (or 6 PM) is 0.75
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    10-17-2018
    Location
    Kentucky
    MS-Off Ver
    Excel 2016
    Posts
    3

    Re: Need help converting time to seconds

    I got it working. Thank you very much for your advice!

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,415

    Re: Need help converting time to seconds

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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 Seconds (Time) To Percentage
    By Mharvz in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-05-2016, 07:34 PM
  2. Replies: 3
    Last Post: 08-10-2016, 10:53 AM
  3. [SOLVED] Help converting time to seconds?
    By gannon_w in forum Excel General
    Replies: 5
    Last Post: 10-29-2014, 09:02 AM
  4. Converting time to seconds? [dd:hh:mm:ss}
    By BenCrockett in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-08-2013, 11:36 PM
  5. Converting time from seconds
    By ssmith911 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-31-2008, 11:43 AM
  6. Converting time format to seconds
    By rqy99g in forum Excel General
    Replies: 2
    Last Post: 05-08-2008, 01:29 PM
  7. [SOLVED] converting time to seconds
    By Peter in forum Excel General
    Replies: 10
    Last Post: 01-18-2006, 07:25 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