+ Reply to Thread
Results 1 to 5 of 5

Subtracting two dates and times

  1. #1
    Registered User
    Join Date
    03-02-2007
    Posts
    2

    Subtracting two dates and times

    I'm trying to find out how to subtract between two dates and times in seperate cells to determine the time between the two in days, hours, minutes.

    For example, cell B1 has '1/19/2005 8:45' and cell A1 has '1/12/2005 10:22' so I need to get B1 minus A1 to display properly the time between the two in days, hours, minutes.

    Thanks in advance for peeps help and advice!
    Last edited by bolo; 03-02-2007 at 10:39 AM.

  2. #2
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    Take a look at Chip's solutions ..
    http://www.cpearson.com/excel/datetime.htm#AddingTimes
    HTH
    Carim


    Top Excel Links

  3. #3
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Try this

    =DAY(B1-A1)&" days "&HOUR(B1-A1-DAY(B1-A1))&" hours "&MINUTE(B1-A1-DAY(B1-A1))&" minutes "&SECOND(B1-A1-DAY(B1-A1))&" seconds "
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  4. #4
    Registered User
    Join Date
    03-02-2007
    Posts
    2
    Quote Originally Posted by oldchippy
    Try this

    =DAY(B1-A1)&" days "&HOUR(B1-A1-DAY(B1-A1))&" hours "&MINUTE(B1-A1-DAY(B1-A1))&" minutes "&SECOND(B1-A1-DAY(B1-A1))&" seconds "
    Seamless! Thanks so much for your help oldchippy!

  5. #5
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Glad to help - thanks for the feedback

+ 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