Leigh and Greg and others who chimed in about this task: I was making
progress. Then, this morning, the client changed the scope of the task. (And
they might change it further.) Anyway, I no longer need to write a query we
discussed. But -- thank you very much, again. I might come back with a
question about CFSCHEDULE. Hope your day is going well.

Eric

-----Original Message-----
From: Leigh [mailto:[email protected]] 
Sent: Wednesday, November 14, 2012 11:03 AM
To: cf-talk
Subject: Re: query: how to return records that are increments of one year
old?


> 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:353181
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to