+ Reply to Thread
Results 1 to 6 of 6

Require Time difference in mm/dd hh:mm

  1. #1
    Registered User
    Join Date
    03-05-2013
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    3

    Require Time difference in mm/dd hh:mm

    Hi,

    Please find my attached excel sheet, here i Require Time difference in mm/dd hh:mm, how do i go about this.

    Am really hoping this forum could help me.

    Thanks,
    Aaron.
    Attached Files Attached Files

  2. #2
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Require Time difference in mm/dd hh:mm

    Hi aaron lewis

    For the time difference, do you mean in hours & minutes!
    In C2:
    =B2-A2

    Format the cells as "[h]:mm" and copy down.
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Require Time difference in mm/dd hh:mm

    If mm/dd means months and days try this formula

    =TEXT(DATEDIF(A2,B2+(MOD(B2,1)>MOD(A2,1)),"m"),"00\/")&TEXT(DATEDIF(A2,B2+(MOD(B2,1)>MOD(A2,1)),"d"),"00 ")&TEXT(B2-A2,"hh:mm")
    Audere est facere

  4. #4
    Registered User
    Join Date
    03-05-2013
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Require Time difference in mm/dd hh:mm

    Quote Originally Posted by daddylonglegs View Post
    If mm/dd means months and days try this formula

    =TEXT(DATEDIF(A2,B2+(MOD(B2,1)>MOD(A2,1)),"m"),"00\/")&TEXT(DATEDIF(A2,B2+(MOD(B2,1)>MOD(A2,1)),"d"),"00 ")&TEXT(B2-A2,"hh:mm")
    ok i get the output as
    Approval Date1 in mm/dd/yyyy hh:mm Approval Date2 in mm/dd/yyyy hh:mm Require Time difference in mm/dd hh:mm
    11/16/2012 09:41 11/20/2012 05:36 00/04 19:54 which is proper as 4 days and 19 hrs


    Can i get the output only in hours or preferably minutes.

    Like for hours : 4days*24 + 19 hrs = 115 hours
    or for minutues: 4days*24*60 + 19*60 + 54 = 6954 minutes

  5. #5
    Registered User
    Join Date
    03-05-2013
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Require Time difference in mm/dd hh:mm

    i just realised that the difference should be shwoing 3 days and 19hrs and not 4 days and 19 hrs!!

  6. #6
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Require Time difference in mm/dd hh:mm

    What are you trying to do!!!

    Look at post #2
    For minutes, format as [m]
    Or use =(B2-A2)*1440

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Require Time difference in mm/dd hh:mm

    Quote Originally Posted by aaron lewis View Post
    i just realised that the difference should be shwoing 3 days and 19hrs and not 4 days and 19 hrs!!
    Yes, apologies, to get the correct result in format mm/dd hh:mm this is the correct version

    =TEXT(DATEDIF(A2,B2-(MOD(B2,1)<MOD(A2,1)),"m"),"00\/")&TEXT(DATEDIF(A2,B2-(MOD(B2,1)<MOD(A2,1)),"d"),"00 ")&TEXT(B2-A2,"hh:mm")

    ....but if you want the result in just hours or minutes that can be done more simply as Kevin suggests....

+ 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