> cast(dateadd('y', -1, getdate()) as date) asĀ  -- getdate() in MSSQL

I do not think 2005 supports the "date" type. A CF alternative is using 
dateAdd("yyyy", -1, now()) to get the date and time one year ago. Then use 
cfqueryparam with type "cf_sql_date" which automatically drops any time portion.

-Leigh


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353163
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to