Fail to pass datetime value to store procedure
Hi,
I have a store procedure which will receive the date passmeter and I write it as following:
<cfif IsDefined("form.yy")>
<cfprocparam cfsqltype="CF_SQL_TIMESTAMP" value="#CreateDate(form.yy, form.mm, form.dd)#">
<cfelse>
<cfprocparam cfsqltype="CF_SQL_TIMESTAMP" value="null" null="yes">
</cfif>
When I did not input the day, it runs correctly.
However, it returns me the error when I input the day:
Conversion failed when converting datetime from character string.
How can I solve the problem?
