I think I've got a handle on queries for output forms where they are passed
a single month/year.  

However, what would a query for a range (such as JAN 2003 to MAR 2003 or JAN
2003 to DEC 2003) look like?  

Here's where I am.

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

Rick
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

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

Reply via email to