date ranges

wxdqz

New Member
hi

I have an events table in MySQL 3.23.32.

each record has a startdate (DATE) and enddate (DATE).

at the frontend, users navigate the events app by selecting a month. doing so will currently list all events that start in the chosen month or end in the chosen month.

anyone have any ideas on how to capture events for the chosen month, where, say, the chosen month is January, and yet an event starts in December and ends in Febuary (the range dec - feb contains jan - thus I want to display this ebent in the listing of events for January)

any ideas? I just tried this:

SELECT ... FROM ... WHERE MONTHNAME('2001-01-01') BETWEEN MONTHNAME(enddate) AND MONTHNAME(startdate)

but that don't work...???

ta
 
Back
Top