just to give you a summary of what i'm trying to achieve -
a user selects a date range of 10/10/2004 to 10/11/2004. now the data returned needs to be grouped by 'week', but I don't want to group 10-16, 17-24 etc. I want to find out what day the 10th is e.g Thursday and then group Thurs til Sunday(which would be the 13th), then forward 14-20, 21-27. Basically grouping Mon-Sun, Mon-Sun...
I've looked at DATEPART but not sure how to find out the date of Monday in a week, from a given date.
If i could do that i'd then use:
DateAdd("ww", 1, Date) to increment the weeks.
Hope that makes sense.
TIA
Dave.
a user selects a date range of 10/10/2004 to 10/11/2004. now the data returned needs to be grouped by 'week', but I don't want to group 10-16, 17-24 etc. I want to find out what day the 10th is e.g Thursday and then group Thurs til Sunday(which would be the 13th), then forward 14-20, 21-27. Basically grouping Mon-Sun, Mon-Sun...
I've looked at DATEPART but not sure how to find out the date of Monday in a week, from a given date.
If i could do that i'd then use:
DateAdd("ww", 1, Date) to increment the weeks.
Hope that makes sense.
TIA
Dave.