How do I calculate minutes worked by 15 intervals?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Yammi
    New Member
    • Dec 2007
    • 1

    How do I calculate minutes worked by 15 intervals?

    Ok, I know that there is a very smart programmer out there that can resovle my issue.

    I am trying to calculate time worked by 15 minute intervals.

    Example:
    =============== ==
    Emp 1 started work at 13:00:00 and worked 183 minutes
    Emp 2 started work at 17:15:00 and worked 150 minutes
    Emp 3 started work at 08:30:00 and worked 17 minutes

    Note: minutes / 15 = total number of of intervals
    183 minutes / 15 = 12.2 (intervals)
    12 x 15 =180
    .2 x 15 = 3 minutes overage - this overage would be placed into the next time slot (see below).

    I need to show the following results:

    time employee #of_min_worked
    ----------------------------------------------
    08:30:00 3 15
    08:45:00 3 2
    09:00:00
    08:30:00
    08:45:00
    09:00:00
    09:15:00
    09:30:00
    09:45:00
    10:00:00
    10:15:00
    10:30:00
    10:45:00
    11:00:00
    11:15:00
    11:30:00
    11:45:00
    12:00:00
    12:15:00
    12:30:00
    12:45:00
    13:00:00 1 15
    13:15:00 1 15
    13:30:00 1 15
    13:45:00 1 15
    14:00:00 1 15
    14:15:00 1 15
    14:30:00 1 15
    14:45:00 1 15
    15:00:00 1 15
    15:15:00 1 15
    15:30:00 1 15
    15:45:00 1 15
    16:00:00 1 3
    16:15:00
    16:30:00
    16:45:00
    17:00:00
    17:15:00 2 15
    17:30:00 2 15
    17:45:00 2 15
    18:00:00 2 15
    18:15:00 2 15
    18:30:00 2 15
    18:45:00 2 15
    19:00:00 2 15
    19:15:00 2 15
    19:30:00 2 15
    19:45:00
    20:00:00
    20:15:00
    20:30:00
    20:45:00
    21:00:00
    21:15:00
    21:30:00
    21:45:00
    22:00:00
    22:15:00
    22:30:00
    22:45:00
    23:00:00
    23:15:00
    23:30:00
    23:45:00
  • caveatashish
    New Member
    • Nov 2007
    • 6

    #2
    do you want the same to be achieved using sql procedure or some other frontend language

    Comment

    Working...