+ Reply to Thread
Results 1 to 6 of 6

Help converting time to seconds?

  1. #1
    Registered User
    Join Date
    11-13-2008
    Location
    Colorado
    Posts
    89

    Help converting time to seconds?

    So I have data that looks like this:

    +00:00, 2:02:57
    +00:16, 2:03:13
    +02:59, 2:05:56
    +03:42, 2:06:39
    +04:31, 2:07:28
    +04:38, 2:07:35

    I'd like to return both columns in seconds like:

    0, 7377
    16, 7393
    179, 7556
    etc...

    There are no commas...I just did that to signify that there are two columns of data (so I'll need 2 different functions).
    The first column will always have a + sign in the beginning if that matters.

    Thanks!
    Last edited by gannon_w; 10-29-2014 at 08:59 AM.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Help converting time to seconds?

    Hi,

    for the 1st column

    =VALUE(SUBSTITUTE(A1,"+","00:"))*24*60*60

    for the second column

    =B1*24*60*60

    Remeber to format the cells as general.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Help converting time to seconds?

    One formula, will work for both columns:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  4. #4
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Help converting time to seconds?

    =(hour(A1)*3600)+(minute(A1)*60)+second(A1)

  5. #5
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Help converting time to seconds?

    Hi,

    for the 1st column

    =VALUE(SUBSTITUTE(A1,"+","00:"))*24*60*60

    for the second column

    =B1*24*60*60

    Remeber to format the cells as general.

  6. #6
    Registered User
    Join Date
    11-13-2008
    Location
    Colorado
    Posts
    89

    Re: Help converting time to seconds?

    All solutions worked...I've added to your reputations!

+ 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. 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
  2. [SOLVED] Converting seconds from midnight to time of day in the HH:MM:SS format
    By luv2glyd in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-26-2013, 10:45 AM
  3. Converting time from seconds
    By ssmith911 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-31-2008, 11:43 AM
  4. Converting time format to seconds
    By rqy99g in forum Excel General
    Replies: 2
    Last Post: 05-08-2008, 01:29 PM
  5. [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