+ Reply to Thread
Results 1 to 4 of 4

Subtracting two cells that have time and date

  1. #1
    Registered User
    Join Date
    03-06-2012
    Location
    atlanta, Georgia
    MS-Off Ver
    Excel 2010
    Posts
    1

    Subtracting two cells that have time and date

    hey guys im really stuck.I have a bunch of data that has 2 columns, each with time and date information. I need to subtract one column from another, and need just the difference in time, in units of minutes. for example, i would need to subtract:

    [2012-02-14 18:31:00.000] - [2012-02-14 07:26:00.000] = [785]

    does anyone know how to do this? Thank in advance. I've attached a small sample of the two colums
    Attached Images Attached Images
    Last edited by phob; 03-06-2012 at 10:08 PM.

  2. #2
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Subtracting two cells that have time and date

    you can use B1-A1 to get the difference, then use costom formating to make it in minutes by using [mm]
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  3. #3
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Subtracting two cells that have time and date

    or..

    =Mod(B1,1) +(mod(A1,1) > mod(B1,1))-mod(A1,1)
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  4. #4
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Subtracting two cells that have time and date

    or if you are looking to output just the minutes a a full number, no longer date formate you could use this, date format is a number as a fraction of a day, so if you multiply it by 24 it becomes hours, then that number by 60 it becomes minutes. 1440 is the product of 24 and 60 to save a step.

    =(B10-A10)*1440

+ 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