+ Reply to Thread
Results 1 to 10 of 10

Formula to calculate the total time between two seperate dates

  1. #1
    Registered User
    Join Date
    06-10-2011
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    7

    Formula to calculate the total time between two seperate dates

    Hi there

    I need a formula that will calculate the total time from when a ticket was opened to closed where the open and closed dates are completely different or there are multiple days in between. For example it was opened on the 07/06/2011 11.19am and closed on the 09/06/2011 13.48pm
    Last edited by DebbieF; 06-14-2011 at 09:27 AM.

  2. #2
    Forum Contributor
    Join Date
    05-04-2009
    Location
    ME
    MS-Off Ver
    Excel 2003,2007
    Posts
    157

    Re: Formula to calculate the total time between two seperate dates

    Hi DebbieF,

    Assume your opened date in Cell A1 and closed date in Cell B1

    Then in cell C1 = B1-A1 "format this cell to Custom [hh]:mm"

    Hope it works..

    Thanks

  3. #3
    Registered User
    Join Date
    06-10-2011
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Formula to calculate the total time between two seperate dates

    I've tried that but it only works out the time and does'n't take into consideration there are several days in between. So if for example the open time shows as 11.00am and the closed time shows as 13.00pm it shows the total time as 2 hours and doesn't take into consideration the fact that the open time was on the 7th June and the closed time on the 9th June

  4. #4
    Forum Contributor
    Join Date
    12-26-2008
    Location
    India
    MS-Off Ver
    2007
    Posts
    122

    Re: Formula to calculate the total time between two seperate dates

    Use C1 = (B1-A1)*1440, this would show the difference in minutes

  5. #5
    Valued Forum Contributor Sadath31's Avatar
    Join Date
    03-02-2011
    Location
    Dammam, Saudi Arabia
    MS-Off Ver
    Office 365
    Posts
    452

    Re: Formula to calculate the total time between two seperate dates

    assume your old date in A1 & new date/time in A2

    =DATEDIF($A$1,B1,"d")&" Days & "&TEXT(B1-A1,"h:mm")&" Min"

  6. #6
    Registered User
    Join Date
    06-10-2011
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Formula to calculate the total time between two seperate dates

    Thanks Sadath31 that is working to an extent but it shows the result as 1 day and 2:23min. I need it to show the result as 26:23min. How do I do that?

  7. #7
    Valued Forum Contributor Sadath31's Avatar
    Join Date
    03-02-2011
    Location
    Dammam, Saudi Arabia
    MS-Off Ver
    Office 365
    Posts
    452

    Re: Formula to calculate the total time between two seperate dates

    then you should go for the formula given by Navas or =TEXT(B1-A1,"[hh]:mm")

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,713

    Re: Formula to calculate the total time between two seperate dates

    I recommend Navas' formula too - it's crucial that you use the formatting suggested in the result cell, i.e. [hh]:mm with square brackets around hh. This means that hours can go beyond 24, unlike h:mm format

    Quote Originally Posted by Sadath31 View Post
    =DATEDIF($A$1,B1,"d")&" Days & "&TEXT(B1-A1,"h:mm")&" Min"
    Be careful with this one - if the time in B1 is earlier in the day than the time in A1 then the days figure will be 1 too high. e.g. if A1 is today at 11:00 AM and B1 is tomorrow at 05:00 AM then there is an 18 hour time difference between those two "timestamps", but that formula will give you a result of

    1 Days & 18:00 Min

    a better formula to show days accurately would be

    =INT(B1-A1)&" days "&TEXT(B1-A1,"h:mm")
    Audere est facere

  9. #9
    Registered User
    Join Date
    06-10-2011
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Formula to calculate the total time between two seperate dates

    Thanks it is working to an extent that at least now it shows the result as 2days2:00. Is there anway to covert this so that it shows as 50:00?

  10. #10
    Registered User
    Join Date
    06-10-2011
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Formula to calculate the total time between two seperate dates

    Figures it out thanks for all the help

+ 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