How do you calculate the number of weeks between two dates?
for example as follows
Declare @StartDate as DateTime = \"01 Jan 2009\"; Declare @EndDate
Use the Datediff function. datediff(ww,@startdate,@enddate)
datediff(ww,@startdate,@enddate)
the ww tells the function what units you require the difference to be counted in.
http://msdn.microsoft.com/en-us/library/ms189794.aspx