I personally donnever create date objects in CF and pass them into SQL - can cause all sorts of probs with the interpretation depending on your SQL settings. what I'd do is create a date in the format dd/mm/yyyy as a character string and then run SET DATEFORMAT DMY before your select statement...........but then that's just me.
-----Original Message----- From: Luce, Greg [mailto:[EMAIL PROTECTED]] Sent: 11 December 2002 16:19 To: CF-Talk Subject: RE: Another Newbie Problem If you have a search form with a month select and a year selectbox. And you're searching for records with call_date newer than the selected values. <cfset compare_date = "#createdate(form.year_search,form.month_search,01)#"> SELECT * FROM tblTable WHERE call_date > '#compare_date#' -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 11, 2002 8:57 AM To: CF-Talk Subject: RE: Another Newbie Problem Rick, Can you explain your situation a little more in depth? There are datepart() functions that allow us to compare parts of dates. Greg Sure, thanks for the interest. We have several thousand records in a db with a standard odbc datetime stamp column. We want to be able to filter out end of month statistics (all trouble calls in November, 2002, for instance) by using a set of drop down menus (month, year, type of call). This is the kind of product one sees everywhere on the internet, but I just can't find a reference piece to get my head in the right place about how to go about it. Plus, as I've learned, there are always several approaches to the same problem. Any ideas are appreciated. Rick ***Sterling Financial Investment Group, Inc. (SFIG) is a member of NASD/MSRB/NFA/SIPC. Email transmissions may be monitored. SFIG cannot accept orders to buy or sell via email. Please visit www.mysterling.com for more information.*** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.

