WHERE cal_date_start <= <cfqueryparam cfsqltype="CF_SQL_DATE" value="#CreateODBCDate(Now())#"> AND cal_date_end >= <cfqueryparam cfsqltype="CF_SQL_DATE" value="#CreateODBCDate(Now())#">
This is independent of your DB. You can also use DB functions to get the current date -----Original Message----- From: Mark Leder [mailto:[EMAIL PROTECTED]] Sent: maandag 10 december 2001 6:52 To: CF-Talk Subject: SQL Query Statement I have two date fields (cal_date_start and cal_date_end). The dates are formatted as mm/dd/yyyy. How would I write a WHERE clause when querying the db to retrieve the records between the two dates (maybe using the "BETWEEN" statement)? It's OK to get records on the actual start date and end date. - So if today is 12/09/2001, its OK to retrieve records between 12/07/2001 and 12/16/2001. In other words: WHERE DateValue(Now()) BETWEEN cal_date_start AND cal_date_end. Thanks, Mark ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists