List,
I have a template that creates a query to get information for the month
selected.  I am doing this by constructing a query like this :

<CFSET Today = #CreateODBCDate(CreateDate(#ByYear#, #ByMonth#, 1))#>
<CFSET EndDay = #CreateODBCDate(CreateDate(#ByYear#, #ByMonth#,
DaysInMonth(#ByMonth#)))#>

<CFQUERY name="Events" datasource="XXX">
SELECT Location, Name, Time, Event_Date, Event_Number, Location
FROM Tbl_Events
WHERE Event_Date >= #Today#
AND Event_Date <= #EndDay#
</cfquery>

ByYear is passed as the year selected from a form.
ByMonth is the numerical month passed from a form.

Now the issue is that when I pass September as "9" then the above cfset for
EndDay returns 2000- 9-31 (obviously wrong) and November as "11" returns
2000-11-31 (also wrong).

What is the problem with these two months??

TIA,
Kevin

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to