Grouping query date by work week

  • Thread starter Regan via AccessMonster.com
  • Start date
R

Regan via AccessMonster.com

I SQL below is what i kinda want just slightly changed. How do i get [date
by week] column to group the date by work week. Our work week is Wed - Tues.
Also how can i get it to display the week ending date
i.e

Week ending Employee Sum of Units
18/07/06 Bob 150
25/07/06 Bob 300

SELECT DISTINCTROW Format$(TimeSheet.Date,'ww yyyy') AS [Date By Week],
TimeSheet.Employee, Sum(TimeSheet.Units) AS [Sum Of Units], Count(*) AS
[Count Of TimeSheet]
FROM TimeSheet
GROUP BY Format$(TimeSheet.Date,'ww yyyy'), TimeSheet.Employee;

Thanks if you can help
 
R

Regan via AccessMonster.com

Well i got it so its adding the units form wed - tues, But in the query
table it comes up as num of wee ie

Week Employee Sum of units
22 Jerry 787
22 Jodie 878
23 Jerry 898
23 Jodie 111

How can i turn the week number into the Weekending DAte

i.e 23 = 06/06/06
24 = 13/06/06
25= 20/06/06

Here is what im using to get results so far

SELECT DISTINCTROW Format$(TimeSheet.Date,'ww',4) AS [Date By Month],
TimeSheet.Employee, Sum(TimeSheet.Units) AS [Sum Of Units], Count(*) AS
[Count Of TimeSheet], Last(TimeSheet.Date) AS LastOfDate
FROM TimeSheet
GROUP BY Format$(TimeSheet.Date,'ww',4), TimeSheet.Employee;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top