PC Review


Reply
Thread Tools Rate Thread

New user question - timesheet query

 
 
mikey
Guest
Posts: n/a
 
      4th Sep 2008
I have been inputting employee timesheet data into a table for the last 3
months.
I have been able to write a query to give the total hours worked in this
time, but I am struggling to develop a query to give me the average hours
worked for each employee over the last rolling 12 weeks.
Please help but keep it simple - thanks.
 
Reply With Quote
 
 
 
 
KARL DEWEY
Guest
Posts: n/a
 
      4th Sep 2008
If your data is stored like this --
EMP WorkDate WorkHours
1 2/2/2008 4.5
2 2/2/2008 9
1 2/3/2008 7
2 2/3/2008 6.5

Then use this query and name EMP_Week_Hrs --
SELECT EMP Format([WorkDate], "yyyyww") AS Worked, Sum([WorkHours]) AS Hours
FROM YourTable
WHERE WorkDate Between Date() And DateAdd("ww", -12, Date())
GROUP BY EMP, Format([WorkDate], "yyyyww");

SELECT EMP, [Hours]/12 AS Avg_per_week
FROM EMP_Week_Hrs;

--
KARL DEWEY
Build a little - Test a little


"mikey" wrote:

> I have been inputting employee timesheet data into a table for the last 3
> months.
> I have been able to write a query to give the total hours worked in this
> time, but I am struggling to develop a query to give me the average hours
> worked for each employee over the last rolling 12 weeks.
> Please help but keep it simple - thanks.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with timesheet query Leanne Microsoft Access Queries 2 1st Feb 2007 07:46 PM
An awkward timesheet question CrankyLemming Microsoft Excel Misc 2 23rd Nov 2004 12:08 AM
Excel VBA - Timesheet query stevieh Microsoft Excel Misc 0 2nd Jun 2004 04:55 PM
Excel VBA - Timesheet query stevieh Microsoft Excel Misc 0 2nd Jun 2004 04:53 PM
Re: Summary Query - Grouping Timesheet Entries by Week Duane Hookom Microsoft Access Queries 2 22nd Sep 2003 02:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:05 AM.