How do you calculate the number of weeks between two dates?
Declare @StartDate as DateTime = "01 Jan 2009"; Declare @EndDate as DateTime = "01 June 2009";
@StartDate and @EndDate
How do you calculate the number of weeks between two dates?
Declare @StartDate as DateTime = "01 Jan 2009"; Declare @EndDate as DateTime = "01 June 2009";
@StartDate and @EndDate
Use the Datediff function. datediff(ww,@startdate,@enddate)
the ww tells the function what units you require the difference to be counted in.