I am attempting to writ a query that based on a Radio select either returs a
week or a month worth of dates from the current date, I can not get this to
work. I think the logic is right but I am missing something, any help is
appreciated.
Code: *** Watch for wrap***
<!--- Query for Event Information --->
<CFQUERY name="PublicEvents" datasource="TKE" username="xichi"
password="tkeekt432234">
SELECT Location, Name, Time, Directions, Event_Date, Pub
FROM Tbl_Events
WHERE 1=1
AND Event_Date >= #CreateODBCDate(Now())#
<!--- If the "One Week" Radio Button was selected get next 7 days
events --->
<CFIF TimeSpan = "Week">
AND Event_Date <= #CreateODBCDate(CreateDate(Year(Now()), Month(Now()),
Day(DateAdd('d', 7, Now()))))#
</cfif>
<!--- If the "One Month" Radio Button was selected get next month of
events --->
<CFIF TimeSpan = "Month">
AND Event_Date <= #CreateODBCDate(CreateDate(Year(Now()),
Month(DateAdd('m', 1, Now())), Day(Now())))#
</cfif>
AND WHERE Pub = 1
ORDER BY Event_Date
</cfquery>
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
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.