> <cfset startDate=CreateDate(Form.startYear, Form.startMonth, 1)>
> <cfset endDate=DateAdd (Form.endYear, Form.endMonth,1)>
> <cfquery name="qDateRange" datasource="ds">
> SELECT * FROM dbo.PaP WHERE test_date >= #CreateODBCDate (startDate)#
> AND test_date < #CreateODBCdate (endDate)# ORDER BY #sort# ASC
> </cfquery>
>

Your SQL looks find.  You could use :

WHERE test_date BETWEEN #CreateODBCDate(startDate)# AND
CreateODBCDate(endDate)

but its kinda six and two threes....

In your <cfset endDate ....>  should that not be a CreateDate() rather than
DateAdd()?

Regards

Stephen
===============================
CF-Europe http://www.cf-europe.org/
Olymia Conference Centre, London
29-30 May 2003
Keynote by Ben Forta and Tim Buntel


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
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.4
                                

Reply via email to