I need help writing a stored procedure that takes the date entered and converts it to a week number stored as a variable which is then passed into a sql statement. Example: user enters 4/6/2009 as a date input it returns week 15 as @week, which is then used in a select statement:
select * from dbtest where createddate = @week. Any assistance is greatly appreciated. Thanks.