+ Reply to Thread
Results 1 to 3 of 3

Calculate time between start time and end time

  1. #1
    Registered User
    Join Date
    02-07-2014
    Location
    Mumbai
    MS-Off Ver
    Excel 2010
    Posts
    1

    Calculate time between start time and end time

    Hi,

    I have a major road block.

    the vendor has a 21 hr working window; start from 7am and goes until 4am; Mon to Fri.

    Here is a scenario:
    - i request for a product information from a vendor on 3-Feb-14 8:00am (Monday)
    - he replies with all of the product info on 6-Feb-14 12:00pm (Thursday)

    can you find the time in above scenario consideration the working window?


    Here is another scenario:
    - i request for a product information from a vendor on 6-Feb-14 8:00am (Thursday)
    - he replies with all of the product info on 11-Feb-14 12:00pm (Tuesday)
    - Sat & Sun are days off but keep in mind that my Friday shift ends on sat at 4am so the networdays formula wont work.

    can you find the time in above scenario consideration the working window?

    Thanks,
    Girish Tare

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: Calculate time between start time and end time

    for the computations - move your days into standard weekdays. As you are calculating time difference it is the same if you take just b-a or (b-c)-(a-c)

    So for both start and end date do not use their standard value, but:
    =A1-4/24
    this way, for instance for start you will have
    6-Feb-14 4:00am (Thursday)
    And then normal use of networkdays is fine.


    second suggestion - as you are using ex2010 check out new function - networkdays.intl
    Best Regards,

    Kaper

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

    Re: Calculate time between start time and end time

    Following Kaper's suggestion, assuming you have start time/date in A2 and end time/date in B2, and those will always be within working hours, you can use this formula to get the total working hours between the two "timestamps"

    =(NETWORKDAYS(A2-"4:00",B2-"4:00")-1)*"21:00"+MOD(B2-"4:00",1)-MOD(A2-"4:00",1)

    custom format result cell as [h]:mm and you'll get 67:00 for both of your examples
    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)

Similar Threads

  1. Replies: 7
    Last Post: 04-25-2020, 03:23 AM
  2. Replies: 3
    Last Post: 12-19-2013, 06:49 AM
  3. [SOLVED] Calculate turnaround time for 9pm-6am working time & Start/End date may be on weekend
    By Wauiwa in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-26-2012, 02:36 PM
  4. Calculate finish time given start time, working hours and job duration
    By swanseaexcel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-23-2012, 03:00 PM
  5. [SOLVED] how to calculate time start & time finish in quarter hour
    By Peter Wu in forum Excel General
    Replies: 3
    Last Post: 06-06-2006, 08:10 PM

Tags for this Thread

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