Pages

Wednesday, May 14, 2014

comparing ms sql date with coldfusion date

comparing ms sql date with coldfusion date


if you use cfsqltype as "cf_sql_date" when you compare date with function CreateODBCDateTime then it will not match so use this data type "cf_sql_timestamp"



Error code: 
and SupplyDate =  <CFQUERYPARAM cfsqltype="cf_sql_date" Value="#CreateODBCDateTime(local.ctrArrSMThisSupplyDetailsSupplyDates.SupplyDate)#">



fixed code: 
and SupplyDate =  <CFQUERYPARAM cfsqltype="cf_sql_timestamp" Value="#CreateODBCDateTime(local.ctrArrSMThisSupplyDetailsSupplyDates.SupplyDate)#">

No comments:

Post a Comment