A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Group data by custom weeks



 
 
Thread Tools Display Modes
  #1  
Old December 12th, 2005, 11:37 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Group data by custom weeks

Hello,


My user gives me startDate and finishDate as input.
I want to group my data by weeks whe
First week first day is startDate
Last week last day is finishDate

Can I do it by a query ?

Thank you for yuor help
Gil D.

  #2  
Old December 13th, 2005, 12:44 AM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Group data by custom weeks

On 12 Dec 2005 15:37:58 -0800, "Gil D." wrote:

Hello,


My user gives me startDate and finishDate as input.
I want to group my data by weeks whe
First week first day is startDate
Last week last day is finishDate

Can I do it by a query ?

Thank you for yuor help
Gil D.


You'll have to explain. What exactly do you want to group by? Week No.
1, Week No. 2? What if the range is not a multiple of 7? Could you
give an example of the data and how you would like it displayed?

John W. Vinson[MVP]
  #3  
Old December 13th, 2005, 09:38 PM posted to microsoft.public.access.queries
external usenet poster
 
Posts: n/a
Default Group data by custom weeks

Hello,

I have a table named: Work
Each record contains workerID, workingDate, working hours etc.
I am trying to create a weekly chart/report.
My user give me as input: startData, endDate.

If Diff(startData, endDate) = 7 then
First week is: startDate,startDate+6
Second week is: startDate+7, startDate+13
....

If the range is not a multiple of 7 then last week will be shorter.
I need to display for my user weeks starting/ending date.

Example of the data and how you would like it displayed:

workerID, workingDate, working hours
1, 11/12/05, 10
2, 11/12/05, 10
1, 18/12/05, 5

User input:
startDate 11/12/05
endDate 22/12/05

Needed Output:
weekStartDate, weekEndDate, SumOfWorkingHours
11/12/05, 17/12/05, 20
18/12/05, 22/12/05, 5

Thank you for your help
Gil D.

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PST file has reached maximum size Jeff C General Discussion 2 October 6th, 2005 01:35 PM
How do I group data by weeks and get it to report 0 for a week? Luke Setting Up & Running Reports 1 September 20th, 2005 02:11 AM
strategy for data entry in multiple tables LAF Using Forms 18 April 25th, 2005 04:04 AM
Group data by weeks not months Daniel General Discussion 1 February 18th, 2005 11:07 AM
SQL view of messed up action queries Kendra Running & Setting Up Queries 2 August 31st, 2004 09:53 PM


All times are GMT +1. The time now is 07:37 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.