I am running SQL Server 2000 and classic asp with vb. I am having a huge headache with a stored procedure which accepts a datetime named start and one named end. I was trying to send today's date minus one week as date1 to a stored procedure, But I couldn't even get it to send todays date.
If date1 = "" Then date1 = now() 'eventually want to subtract 7 days from thisEnd IfIf date2 = "" Then date2 = now()End If
I have the stored procedure running fine for the other input parameters except for the dates. here is where I am appending the start date.
.Parameters.Append cmdTmp2.CreateParameter("start",135,1,,date1) '129=adChar, 1=adParamInput .Parameters.Append cmdTmp2.CreateParameter("end",135,1,,date2) '129=adChar, 1=adParamInput
I am recvieing an error: Error converting data type char to datetime