Because if u are using this way ColdFusion is going to be looking for a
variable called close_date, not a db field. Since close_date exists in your
database only, its not present on the CF variable stack. You will need to
find the equivalent MSAccess function to use.
from msaccess help,
DateDiff (�interval�, �date1�, �date2�)
DateDiff("ww", "1-1", Now())
DateDiff("y", #1-Feb-1995#, Now())
-----Original Message-----
From: Angel Stewart [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 4:23 PM
To: CF-Community
Subject: RE: Using DateDiff within SQL..
I'm using MSAccess.
So now I use dthe # and #
And I get this error:
Error resolving parameter CLOSE_DATE
I changed the where clause to:
#datediff('d',close_date, now())# > = 5
Now like I said before, Close_Date IS a field in the database..and it IS a
DateTime field.
This is the whole query.
<CFQUERY name="GetExpiredBids" datasource="#DSN#">
Select close_date,bidid From tblBids
WHERE #datediff('d',close_date, now())# > = 5
</CFQUERY>
I think I am making some little mistake somewhere..but I don't know
what..:-\
-Gel
-----Original Message-----
From: Duane Boudreau [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 3:58 PM
To: CF-Community
Subject: RE: Using DateDiff within SQL..
if you are using SQLServer you can use
WHERE datediff('d',close_date, getdate()) > = 5
You cant use CF functions directly in SQL statements unless you use the #
symbols
HTH,
Duane
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=5
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=5
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5