Home Forums SQL Server 7,2000 T-SQL Help with TSQL, getting StartDate and EndDate from WeekDate !!! RE: Help with TSQL, getting StartDate and EndDate from WeekDate !!!

  • Your question is a bit convoluted and so I'm not quite sure what you want from the data.

    Querying by week, you could use the datepart() function and use the week number to group rows together by week. Then you could easily use the min date from that week and it should be the startdate according to what I gather from your data. The enddate would be startdate + 7, no need to calculate.

    Not sure if this would help, but you might try writing a few queries with that function (need a group by as well) and see if that helps.