Hi How do I modify my query below, so that when an event date has passed it is no longer shown, so for example if an event was on January 12 2002, it would not show up in the results returned, it would only show the events happening from todays date i.e. January 14th.
How could this feature be implemented into the code below, any ideas would be most appreciated. <cfset MonthsToDisplay = 2> <cfset BeginDate = "#Month(now())#/1/#Year(now())#"> <cfset EndDate = "#Month(DateAdd("m", MonthsToDisplay,now()))#/#DaysInMonth(DateAdd("m", MonthsToDisplay,now()))#/#Year(DateAdd("m", MonthsToDisplay, now()))#"> <cfquery name="getupcomingevents" datasource="events"> SELECT eventid, eventdate, to_char(eventdate,'YYYY') AS eventYear, to_char(eventdate,'MM') AS eventMonth, longtitle, location FROM whatson WHERE trunc(eventdate) BETWEEN TO_DATE('#DateFormat(variables.Begindate,"dd/mm/yyyy")#','DD/MM/YYYY') AND TO_DATE('#DateFormat(variables.Enddate,"dd/mm/yyyy")#','DD/MM/YYYY') ORDER BY eventdate asc </cfquery> Thanks Ian ______________________________________________________________________ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists