Will this work?
<cfquery name="getAnnouncements" datasource="#Request.DSN#">
 SELECT *
 FROM
  Announcements
 WHERE
 Announcements.AnnouncementExpDate <= '#DateFormat(Now(),'m/d/yyyy')#'
 ORDER BY Announcements.AnnouncementStartDate
</cfquery>

you may also have to assign the value of now as a variable, as sometimes sql
bombs with now()

also could you just use the sql function getDate() instead of the cf one?
 

-----Original Message-----
From: Candace Cottrell [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 04, 2003 2:00 PM
To: CF-Community
Subject: Date quickie


Any idea why this where clasue is bombing? The expDates in the database
are 6/30/2003 and 7/1/2003, yet no records are returning. The MS-SQL
datatype for the field is datetime.
 
 
 
<cfquery name="getAnnouncements" datasource="#Request.DSN#">
 SELECT *
 FROM
  Announcements
 WHERE
 Announcements.AnnouncementExpDate <= <cfqueryparam
cfsqltype="cf_sql_date" value="#DateFormat(Now(),'m/d/yyyy')#">
 ORDER BY Announcements.AnnouncementStartDate
</cfquery>
 
Candace K. Cottrell, Web Developer 
The Children's Medical Center 
One Children's Plaza 
Dayton, OH 45404 
937-641-4293 
http://www.childrensdayton.org
 
 
[EMAIL PROTECTED]


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=5
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=5

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

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

Reply via email to