+ Reply to Thread
Results 1 to 7 of 7

Need Formula to for time difference with 0d 00h 00m formats

  1. #1
    Registered User
    Join Date
    06-14-2014
    Location
    Birmingham, USA
    MS-Off Ver
    Office 365 Version 2202
    Posts
    59

    Need Formula to for time difference with 0d 00h 00m formats

    Hi,

    In D6 I have this time value: 0d 02:00:00h - Which translates to 2 hours and 0 seconds

    In D7 I have this time value: 3d 16:09:23h - Which translates to 3 days, 16 hours, 9 minutes and 23 seconds


    I need a formula for D8 to give me an output of the the time difference from D6 to D7. So it should give me a result of: 3d 14:09:23h



    Thanks!!!!

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2503 Build 16.0.18604.20000) 64-bit
    Posts
    3,992

    Re: Need Formula to for time difference with 0d 00h 00m formats

    Hi,

    Please upload your spreadsheet with desired result once.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Need Formula to for time difference with 0d 00h 00m formats

    Hi,

    Try the following formula in D8, this is assuming that the dates are in TEXT format:

    Please Login or Register  to view this content.
    See the attached file.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-14-2014
    Location
    Birmingham, USA
    MS-Off Ver
    Office 365 Version 2202
    Posts
    59

    Re: Need Formula to for time difference with 0d 00h 00m formats

    Worked like a charm. Thanks and WOW that was fast! Adding Rep.

  5. #5
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Need Formula to for time difference with 0d 00h 00m formats

    You are welcome

    If that takes care of your question, please mark this thread as Solved by selecting Thread Tools --> Mark thread as solved.

  6. #6
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,937

    Re: Need Formula to for time difference with 0d 00h 00m formats

    =TEXT(LEFT(D7,SEARCH("d",D7)-1)+MID(D7,4,8)-LEFT(D6,SEARCH("d",D6)-1)-MID(D6,4,8),"d\d hh:mm:ss\h")
    Please Login or Register  to view this content.
    Try this
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  7. #7
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,937

    Re: Need Formula to for time difference with 0d 00h 00m formats

    =TEXT(LEFT(D7,SEARCH("d",D7)-1)+MID(D7,SEARCH("d",D7)+2,8)-LEFT(D6,SEARCH("d",D6)-1)-MID(D6,SEARCH("d",D6)+2,8),"d\d hh:mm:ss\h")
    Try this one
    above formula will not work if days contain more than 9 (This also work for 30 day of difference not more than that)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Averaging Time after using formula to determine time difference
    By Yfandeslady in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-26-2014, 03:22 PM
  2. [SOLVED] time difference formula - need fix
    By Lukael in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-21-2014, 12:58 AM
  3. [SOLVED] Formula for time difference
    By MyOnion in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-19-2013, 03:13 AM
  4. Time difference formula help
    By gcwozniak in forum Excel General
    Replies: 2
    Last Post: 05-24-2011, 10:08 PM
  5. Calculating time difference with different formats
    By r_georg in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-11-2010, 05:36 PM
  6. [SOLVED] Cell formats, and time difference
    By Peter Kirk in forum Excel General
    Replies: 1
    Last Post: 05-25-2005, 05:45 PM
  7. Time Difference Formula
    By MEL79 in forum Excel General
    Replies: 2
    Last Post: 03-11-2005, 05:57 PM

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