Thanks, Scott, but I don't think you caught that I don't want to use
today(as in right now), but rather a date that is already in my database
(called todate).
<cfquery name="getshows" databasse="showstop">
select * from shows where
#createodbcdate(now())# between
todate and
<<< I need a date that is one week from the field "todate" >>>
</cfquery>
- Matt Small
-----Original Message-----
From: VAN VLIET, SCOTT E (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 2:10 PM
To: CF-Talk
Subject: RE: How can I add a timespan to a date in sql (access)?
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
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
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