S
Stephen Jame Pattenden
I have a table of data for which each record has a date and an amount of lost
time. I am trying to group the total lost time into each week for a each
year. I have created the following query to do this:
SELECT [Lost Time].Date, DatePart("yyyy",[Date],2,2) & " " &
DatePart("ww",[Date],2,2) AS [Year Week], [Lost Time].[Minutes Lost] AS
[Total Lost Time], [Lost Time].Date
FROM [Lost Time]
WHERE ((([Lost Time].Date)>#12/31/1998#))
ORDER BY [Lost Time].Date;
What i have noticed is that, if we take week 52 2005 as an example, because
the 1st of Jan 2006 was actually in week 52 of 2005 my "Year Week" column
actually reads "52 2006", when it should be grouped with "52 2005".
Does anyone have any suggestions as to how i can overcome this problem,
preferably being able to keep the "Year Week" column...?
I hope this makes sense, please let me know if you would like me to explain
further.
Many thanks in advance
time. I am trying to group the total lost time into each week for a each
year. I have created the following query to do this:
SELECT [Lost Time].Date, DatePart("yyyy",[Date],2,2) & " " &
DatePart("ww",[Date],2,2) AS [Year Week], [Lost Time].[Minutes Lost] AS
[Total Lost Time], [Lost Time].Date
FROM [Lost Time]
WHERE ((([Lost Time].Date)>#12/31/1998#))
ORDER BY [Lost Time].Date;
What i have noticed is that, if we take week 52 2005 as an example, because
the 1st of Jan 2006 was actually in week 52 of 2005 my "Year Week" column
actually reads "52 2006", when it should be grouped with "52 2005".
Does anyone have any suggestions as to how i can overcome this problem,
preferably being able to keep the "Year Week" column...?
I hope this makes sense, please let me know if you would like me to explain
further.
Many thanks in advance