I am trying to make a stored procedure where it gets passed a datetime, I take the datetime that was passed and call DATENAME to get the name of the day and set it to a variable. I am not sure this made sence but here is what I have so far, it just does not seem to be working.
@appointmentDate datetime
declare dow varchar(15);
set dow = datename(dw, @appointmentDate);
update dbo.Appointments where @dow = 'Tuesday'