> try # 3
> select dte_2dlcl from execcoresp000.correspondence
> where dateDiff('d',#today#,'dte_2dlcl')< 8
Keep in mind it is often more efficient to rewrite the query using a basic date
comparison. (Functions can sometimes impede the database's use of indexes.) The
syntax depends what you mean by "within 8 days" and whether your column stores
a date only or a date and time. Some examples are:
ie
- WHERE SomeDateColumn > <cfqueryparam value="#someDate#"
cfsqltype="cf_sql_timestamp">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:340780
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm