+ Reply to Thread
Results 1 to 4 of 4

get total hours from 2 dates

  1. #1
    Biff
    Guest

    Re: get total hours from 2 dates

    Hi!

    If your class days are always Monday through Friday you could use the
    Networkdays function for this.(and the formula would be less complicated
    than the one below!)

    Here's something that will work:

    A1 = 6/10/2005 8:00
    B1 = 6/11/2004 16:00

    =((INT(B1)-INT(A1))-1)*8/24+SUM(MIN(16/24,MOD(B1,1))-8/24,MAX(16/24,MOD(A1,1))-8/24)

    Format the cell as [h]:mm

    Biff

    "LU" <[email protected]> wrote in message
    news:[email protected]...
    >I need the total time from to dates.
    > My class starts on 6/10/2005 8:00
    > My class end on 6/11/2004 16:00
    >
    > My excel spreadsheet has 6/10/2005 8:00 in one cell and 6/11/2004 16:00 in
    > another.
    >
    > When I just do a date difference I get about 32 total hours which is
    > wrong.
    > The total hours should be 16 hours since the class runs from 8:00 to 16:00
    > each day.
    > Help please




  2. #2
    Biff
    Guest

    Re: get total hours from 2 dates

    Hi!

    If your class days are always Monday through Friday you could use the
    Networkdays function for this.(and the formula would be less complicated
    than the one below!)

    Here's something that will work:

    A1 = 6/10/2005 8:00
    B1 = 6/11/2004 16:00

    =((INT(B1)-INT(A1))-1)*8/24+SUM(MIN(16/24,MOD(B1,1))-8/24,MAX(16/24,MOD(A1,1))-8/24)

    Format the cell as [h]:mm

    Biff

    "LU" <[email protected]> wrote in message
    news:[email protected]...
    >I need the total time from to dates.
    > My class starts on 6/10/2005 8:00
    > My class end on 6/11/2004 16:00
    >
    > My excel spreadsheet has 6/10/2005 8:00 in one cell and 6/11/2004 16:00 in
    > another.
    >
    > When I just do a date difference I get about 32 total hours which is
    > wrong.
    > The total hours should be 16 hours since the class runs from 8:00 to 16:00
    > each day.
    > Help please




  3. #3
    LU
    Guest

    get total hours from 2 dates

    I need the total time from to dates.
    My class starts on 6/10/2005 8:00
    My class end on 6/11/2004 16:00

    My excel spreadsheet has 6/10/2005 8:00 in one cell and 6/11/2004 16:00 in
    another.

    When I just do a date difference I get about 32 total hours which is wrong.
    The total hours should be 16 hours since the class runs from 8:00 to 16:00
    each day.
    Help please

  4. #4
    Biff
    Guest

    Re: get total hours from 2 dates

    Hi!

    If your class days are always Monday through Friday you could use the
    Networkdays function for this.(and the formula would be less complicated
    than the one below!)

    Here's something that will work:

    A1 = 6/10/2005 8:00
    B1 = 6/11/2004 16:00

    =((INT(B1)-INT(A1))-1)*8/24+SUM(MIN(16/24,MOD(B1,1))-8/24,MAX(16/24,MOD(A1,1))-8/24)

    Format the cell as [h]:mm

    Biff

    "LU" <[email protected]> wrote in message
    news:[email protected]...
    >I need the total time from to dates.
    > My class starts on 6/10/2005 8:00
    > My class end on 6/11/2004 16:00
    >
    > My excel spreadsheet has 6/10/2005 8:00 in one cell and 6/11/2004 16:00 in
    > another.
    >
    > When I just do a date difference I get about 32 total hours which is
    > wrong.
    > The total hours should be 16 hours since the class runs from 8:00 to 16:00
    > each day.
    > Help please




+ 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