Getting this on a query. Parameters: nextthursday = {ts '2009-10-29 00:00:00'} lastthursday = 2009-10-22 00:00:00.000
<cffunction access="public" name="qry_contestthisweek_get" output="false" returntype="query"> <cfargument name="lastthursday" type="string" default=""> <cfset nextthursday = dateadd("d", 7, arguments.lastthursday)> <cfquery name="qry_contestthisweek_get" datasource="#variables.datasource#"> select * from #variables.sqlobjectprefix#contest where 1 = 1 and addeddate between <cfqueryparam value="#createodbcdatetime(arguments.lastthursday)#" cfsqltype="CF_SQL_TIMESTAMP"> and <cfqueryparam value="#createodbcdatetime(nextthursday)#" cfsqltype="CF_SQL_TIMESTAMP"> order by score, age </cfquery> <cfreturn qry_contestthisweek_get> </cffunction> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327735 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4