+ Reply to Thread
Results 1 to 8 of 8

Date Difference in Hours

  1. #1
    Forum Contributor
    Join Date
    12-14-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    102

    Date Difference in Hours

    Hello all,
    I have four fields as follows: schedule date, schedule time, release date, release time. How do I creat a calculated field to show the diference in hours between schedule date/time and release date/time?

    Thanks

  2. #2
    Forum Contributor
    Join Date
    01-28-2014
    Location
    Turkey
    MS-Off Ver
    Excel 2013
    Posts
    159

    Re: Date difference in hours

    A1: Date
    B1: Time
    C1: Date
    D1: Time

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    09-30-2013
    Location
    Toronto, ON
    MS-Off Ver
    Excel 2007
    Posts
    229

    Re: Date difference in hours

    Assuming a2 = sched date; b2 = sched time; c2 = release date; d2 = release time
    Please Login or Register  to view this content.
    If this helped, please click (*) Add Reputation

  4. #4
    Forum Contributor
    Join Date
    01-28-2014
    Location
    Turkey
    MS-Off Ver
    Excel 2013
    Posts
    159

    Re: Date difference in hours

    Or

    Please Login or Register  to view this content.
    Cell format [h]:mm

  5. #5
    Forum Contributor
    Join Date
    12-14-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    102

    Re: Date difference in hours

    Is it possible to display the numbers as negative and positive based on if it is less than or greater than the scheduled date and time?

  6. #6
    Forum Contributor
    Join Date
    09-30-2013
    Location
    Toronto, ON
    MS-Off Ver
    Excel 2007
    Posts
    229

    Re: Date difference in hours

    Because the standard functions have to have the release date/time > sched date/time the formula gets quite complicated. I think this one works most of the time - I haven't tested all scenarios
    Please Login or Register  to view this content.

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

    Re: Date difference in hours

    Quote Originally Posted by smugglersblues View Post
    Is it possible to display the numbers as negative and positive based on if it is less than or greater than the scheduled date and time?
    How do you want the result to look, excel can only handle negative time values in certain circumstances, would it be OK to show something like -67.5 to represent minus 67 hours and 30 minutes?

    If so just use Ali's suggestion but multiply by 24 and format as number

    =(C2+D2-A2-B2)*24
    Audere est facere

  8. #8
    Forum Contributor
    Join Date
    12-14-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    102

    Re: Date difference in hours

    I will give your suggestion a try daddylonglegs. I'll reply back with the resuts later today.

+ 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. [SOLVED] Difference between two Date and Times cell in Hours
    By kidengineer in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-23-2013, 04:05 AM
  2. Replies: 1
    Last Post: 09-13-2012, 05:50 AM
  3. Replies: 0
    Last Post: 09-13-2012, 05:28 AM
  4. Hours difference between 2 Date & Time stamps
    By bondi26 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-21-2007, 10:24 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