+ Reply to Thread
Results 1 to 5 of 5

Date subtraction formula

Hybrid View

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

    Re: Date subtraction formula

    Your formula should work OK for start and end times that are within working hours. The first negative number is caused because 16th February 2013 was a Saturday. In your last example 09:32 AM and 09:12 PM can't both be within an 11 hour working day. Assuming a working day 08:00 to 19:00 you can use this revised formula to work with start/end dates/times that may be outside working hours

    =(NETWORKDAYS(A1,B1)-1)*("19:00"-"8:00")+IF(NETWORKDAYS(B1,B1),MEDIAN(MOD(B1,1),"8:00","19:00"),"19:00")-MEDIAN(NETWORKDAYS(A1,A1)*MOD(A1,1),"8:00","19:00")
    Last edited by daddylonglegs; 05-20-2013 at 04:59 PM.
    Audere est facere

+ 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