SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Query for hours at work each day.

    I have an SQL table "tasks". The table has a date_performed and a begin_time and end_time of each task.

    I have been asked by a client to generate a report of the time the service guy was "at work" for each day (not a sum of the job times). This is defined as the time between the start_time of the first task each day to the end_time of the last task.
    They want a table with the date and hours at work for any given date range they specify.

    The number of jobs each day is variable but luckily no jobs go past midnight.

    Any help appreciated...

  2. #2
    SitePoint Wizard tgavin's Avatar
    Join Date
    Feb 2003
    Location
    FL
    Posts
    1,051
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What's the question? Do you need help with a query to find the time difference or help with setting up a table to record the hours?


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
  •