>wrap dateformat() around the dateadd() function.
>
>tw
>
>Sent from my iPhone... don't hate
>
>On Oct 27, 2009, at 12:02 AM, Matthew Smith <chedders...@gmail.com>  
>wrote:
>
>>

Still the same:

<cffunction access="public" name="qry_contestthisweek_get" output="false" 
returntype="query">
        <cfargument name="lastthursday" type="string" default="">
    <cfset nextthursday = dateformat(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:327737
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to