BigRed1212
Technical User
Surely this is a path well trod, just unfamiliar to me.
Given a year (eg 2010, 2011, 2012 - user input), I would like to return a recordset with week, start of the week, end of the week.
Looking like:
I've Googled and messed with datepart, datediff, and dateadd but I just don't see it.
Ultimately, I would want to left join this list to a query that returns some counts and stuff grouped by week number, so the final could be used to show what happened between 7/18/2010 and 7/24/2010 (Week 30) for example.
Hints, helps, ideas?
Given a year (eg 2010, 2011, 2012 - user input), I would like to return a recordset with week, start of the week, end of the week.
Looking like:
Code:
weeknumber startdate enddate
1 1/1/2010 1/2/2010
2 1/3/2010 1/9/2010
3 1/10/2010 1/16/2020
4 1/17/2010 1/23/2010
5 1/24/2010 1/30/2010
6 1/31/2020 2/06/2010
7 2/7/2010 2/13/2010
etc
Ultimately, I would want to left join this list to a query that returns some counts and stuff grouped by week number, so the final could be used to show what happened between 7/18/2010 and 7/24/2010 (Week 30) for example.
Hints, helps, ideas?