+ Reply to Thread
Results 1 to 5 of 5

Calculate Date/Time between two dates and times

  1. #1
    Registered User
    Join Date
    03-22-2010
    Location
    new zealand
    MS-Off Ver
    Excel 2007
    Posts
    4

    Calculate Date/Time between two dates and times

    The below dates are exported to Excel from another program. I want to figure out in a 3rd cell what the difference is by date and time so I can figure out it took 1.5 days or 1 day 3 hours 5 mins which ever is easier. Any help would be great. The date formate is DD/MM/YY and in Excel 2007. Also what should the cells be formated as?

    Date1

    2/02/2010 9:11:23 a.m.

    Date4

    4/02/2010 8:16:56 a.m.
    Last edited by LJ76; 03-23-2010 at 06:27 PM.

  2. #2
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: Calculate Date/Time between two dates and times

    It would simply be =A4-A2, formatted as [d]" days, "h:mm:ss

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Calculate Date/Time between two dates and times

    Date1 in A1
    Date 2 in A2
    In A3 the formula =A2-A1

    ...Format the cell A3 as [h]:mm


    Is that ok? For me it shows 47 hours and 5 minutes.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    03-22-2010
    Location
    new zealand
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Calculate Date/Time between two dates and times

    Thanks for that, but is it possible to convert the 47 hours 5 minutes to a day such as 1.95 days. I am assujing I would need to hide the cell with the 47 hours andt hen just have the other cell with the days.

  5. #5
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: Calculate Date/Time between two dates and times

    No, just one minus the other, formatted as a number. Excel reads each day as 1, so 47 hours comes out to about 1.96 days.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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