+ Reply to Thread
Results 1 to 3 of 3

Calculating time difference with different formats

  1. #1
    Registered User
    Join Date
    02-11-2010
    Location
    Mt.Kisco, NY
    MS-Off Ver
    Excel 2007
    Posts
    2

    Question Calculating time difference with different formats

    I would like to calculate a difference in seconds between two columns of timestamps
    1. First one is "00:34:52" and formatted as "00:34:52" in Custom hh:mm:ss format.
    2. Second is "12:34:55 AM" and formatted as "00:34:55" in Custom hh:mm:ss format.

    I tried the recommended =TEXT(B2-A2,"ss") with different permutations in the formatting but to no avail.

    Any suggestions are deeply appreciated.
    Attached Files Attached Files
    Last edited by r_georg; 02-11-2010 at 04:18 PM.

  2. #2
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: Calculating time difference with different formats

    you have to understand that time is indexed to 1 day
    0 (zero) = 0
    1 (one) = 1 day = 24 hours = 1440 minutes = 86400 seconds

    If you want seconds than you need to multiply with 86400.

    Set the cell format back to general as it is no longer time but a value with seconds as unit.
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  3. #3
    Registered User
    Join Date
    02-11-2010
    Location
    Mt.Kisco, NY
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Calculating time difference with different formats

    Quote Originally Posted by rwgrietveld View Post
    you have to understand that time is indexed to 1 day
    0 (zero) = 0
    1 (one) = 1 day = 24 hours = 1440 minutes = 86400 seconds

    If you want seconds than you need to multiply with 86400.

    Set the cell format back to general as it is no longer time but a value with seconds as unit.

    I understand the day indexing but that does not help in this case.
    Let me ask the question in a different way.
    How can I adjust the following cell data "00:03:45" to represent for instance "02/10/2010 12:03:45 AM" so I can calculate a time difference?
    TIA

+ 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