I think you are passing incorrect parameters to dateadd. Correct syntax is DATEADD(datepart, number, date), for example 15 days prior to the current date
DATEADD(d, -15, getdate())
See DATEADD (T-SQL) in BOL for details.
>hi
>
>I am unable to execute this code on my ASP page.The error is
>Type mismatch getdate.I am using SQL server.
>
>Earliar I had used access than now() for current date is working perfectly OK.
>
>if Request.Form("searchdate") <> 0 then
> dt = cint(Request.Form("searchdate"))
> StrSql = StrSql & "T_date > " & dateadd("d", "-dt", getdate()) & ") and ("
>End if
--sb--