Have you tried this:

WHERE datediff("d",close_date, Now()) > = 5

It looks like you need the double quotes (") from the Access docs.

Duane


-----Original Message-----
From: Angel Stewart [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 5:16 PM
To: CF-Community
Subject: RE: Using DateDiff within SQL..


Well then that's what I thought: I can't do this in SQL..because I can't
reference the close_date field in SQL.

So I'm going to have a to use a damned CFLOOP query=GetExpiredBids And then
do the check on the closedate there and whatever else needs to be done.

Drats. I thought I wouldn't have had to do it that way.
But that's the only option I see.

I can't do any of the things that the MsAccess docs suggest.. because I need
to reference that table field within the query, and it seems I can't do
that?

Oh well..thanks all...sorry to interrupt the banter ^_^

-Gel

-----Original Message-----
From: Duane Boudreau [mailto:[EMAIL PROTECTED]]

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())





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=5
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=5
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5

Reply via email to