can you reassign week numbers

  • Thread starter Thread starter Pat
  • Start date Start date
P

Pat

want to assign week 1 to the starting date for each new group is this
possible? The groups will be around for about 14 weeks each, so would
want each group to have 14 weeks of information

Any ideas?
 
No, week numbers are calculated using an intrinsic function. What you can do
is store the date that is the beginning date of the first week. Then, you
can use the datediff function to calculate the weeks from the beginnig to a
given date.
 
The groups will be around for about 14 weeks each,
IF you want exactly 14 weeks each then use this ----
Week in Group: Format([YourDateField],"ww") Mod 14

Sort by date then this field.
 
more on what I'm trying to accomplish

have a table called hog inventory that keeps track of the hog
movements (moved in, sold, transferred) for each group into each
building, e.g. Building 5B Group 23. There are over 50 buildings and
the groups are moved in and then sold after 13-16 weeks.

Another table keeps track of the group information, fields are
Building, GroupID, In Date, Out Date, Stage.

Another table keeps track of the feed that goes to each building,
fields are: Date (this is the date delivered), Tons, Building,
GroupID, RationID, MillID

We want to be able to graph the different rations that are feed each
week to each group and be able to compare to other groups. That's why
I need the the In Date to be Week 1. So we can see how much of a
certain ration has gone out for each specific week.
 
Pat

If you store, as others have suggested, the startdate, you can calculate a
Week#.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
okay, my start date would be the "In Date". Can you give me an
example????? Please and thank you.
 
okay, my start date would be the "In Date". Can you give me an
example????? Please and thank you.

DateDiff("ww", [In Date], Date())

will return the number of weeks (Sundays) between In Date and today's date.

John W. Vinson [MVP]
 
Thanks for the help. Finally figured it out..

WeekInGroup: DateDiff("ww", [In Date], [Date]) Was able to get the
difference between the date the hogs went into the building and the
date feed was delivered.
 
Back
Top