+ Reply to Thread
Results 1 to 6 of 6

Finding the difference between two times isn't working for me

  1. #1
    Registered User
    Join Date
    02-18-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    2

    Finding the difference between two times isn't working for me

    Hi,
    I have a spread with a column of start times and end times and subtracted them to get the duration of the activity. That worked fine with UK date format and my settings as English UK. But now I have data with US date format and subtract just gives an error. I have tried changing my settings to English US, changing the format of the cells but nothing seems to work. I have attached a spreadsheet with a working UK example and a US one that doesn't. If anybody can tell me what I am doing wrong I would greatly appreciate it. Thanks.
    Matthew
    Attached Files Attached Files

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Finding the difference between two times isn't working for me

    .
    I used

    Please Login or Register  to view this content.
    and formatted for h:mm:ss

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Finding the difference between two times isn't working for me

    You're probably going to need some brute force string manipulation with right mid and left.
    This will get the date in A7 converted to a real date and time that can be worked with.

    =DATE(MID(A7,7,4),LEFT(A7,2),MID(A7,4,2))+RIGHT(A7,8)

  4. #4
    Registered User
    Join Date
    02-18-2013
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Finding the difference between two times isn't working for me

    Thank you both very much.
    Logit - I gave the sum formula a try but it still didn't work for me.
    Jonmo1 - Thank you. I used your formula to convert the start date and the end date and then subtracted them as before and I got the difference in time that I wanted.
    Matthew

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Finding the difference between two times isn't working for me

    You're welcome.

  6. #6
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Finding the difference between two times isn't working for me

    .
    Glad you found the solution.

    Guess it's the difference between my US English system and your British English system.

+ 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] Difference between 2 days and times, including only working hours
    By ollyr in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 12-16-2016, 08:45 AM
  2. [SOLVED] Difference between two times - avoiding ###### for times that span midnight
    By Abarency in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-07-2015, 01:15 PM
  3. [SOLVED] Finding the difference between two dates and times
    By Harper95th in forum Excel General
    Replies: 8
    Last Post: 02-14-2014, 02:53 PM
  4. difference between times not working for after midnight.
    By superchew in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-28-2013, 01:47 AM
  5. Replies: 2
    Last Post: 10-24-2012, 02:37 PM
  6. Replies: 3
    Last Post: 03-09-2012, 08:19 AM
  7. difference between two times
    By Reign in forum Excel General
    Replies: 6
    Last Post: 02-12-2012, 09:12 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