Try This:

<cfset Today = Now()>
<cfset AWeekFromToday = DateAdd("w", 1, Today)>
<cfquery name="getShows" datasource="showstop">
        select *
        from shows 
        where showdate 
                between #CreateODBCDate(Today)# and
#CreateODBCDate(AWeekFromToday)#
</cfquery>

HTH

--
Scott Van Vliet
Senior Analyst
SBC Services, Inc.
ITO Enterprise Tools
Office: 858.886.3878
Pager: 858.536.0070
Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
 


-----Original Message-----
From: Matthew R. Small [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 11:12 AM
To: CF-Talk
Subject: SQL: How can I add a timespan to a date in sql (access)?


Hi - I want to add a week to a date in sql(access) and then compare
against that date.

<cfquery name="getshows" databasse="showstop">
        select * from shows where 
        #createodbcdate(now())# between 
        todate and 
        <<<a week from todate>>>
</cfquery>


Thanks,
Matt Small


______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to