Just in case anybody is interested...
Access SQL has a function DateAdd that is exactly like ColdFusion's.
This is the working example
<cfquery name="getshows" datasource="showstop">
select * from shows where
#createodbcdate(now())# between
todate and dateadd('ww',1,todate)
</cfquery>
- Matt Small
-----Original Message-----
From: VAN VLIET, SCOTT E (SBCSI) [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 2:22 PM
To: CF-Talk
Subject: RE: How can I add a timespan to a date in sql (access)?
DOH! "ww" is correct ^_^
--
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: Larry Juncker [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 11:18 AM
To: CF-Talk
Subject: RE: How can I add a timespan to a date in sql (access)?
<cfset thisWeek = #Now()#>
<cfset nextWeek = #DateAdd('ww',1,thisWeek)#>
<cfquery name="getshows" databasse="showstop">
select * from shows where
ShowDate between
#createODBCDate(thisWeek)# and
#createODBCDate(nextWeek)#
</cfquery>
-----Original Message-----
From: Matthew R. Small [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 1:12 PM
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
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.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