[MySQL] Having unsuccessful attempts at returing records that fall within a given date range...
Given two fields of either DATE or DATETIME types: {startEvent, endEvent} = {2/7/2005, 2/7/2005}
SQL:
SELECT * FROM table WHERE startDate <= '2/7/2005' AND endDate >= '2/7/2005' ORDER BY eventID
This returns nothing. I can just do a startdate > '2/7/2005' and that returns the record - but obviously not what we're trying to do here.
This does work w/ MS Access though:
SELECT * FROM table WHERE startDate <= #2/7/2005# AND endDate >= #2/7/2005# ORDER BY eventID
Any help please?!
Given two fields of either DATE or DATETIME types: {startEvent, endEvent} = {2/7/2005, 2/7/2005}
SQL:
SELECT * FROM table WHERE startDate <= '2/7/2005' AND endDate >= '2/7/2005' ORDER BY eventID
This returns nothing. I can just do a startdate > '2/7/2005' and that returns the record - but obviously not what we're trying to do here.
This does work w/ MS Access though:
SELECT * FROM table WHERE startDate <= #2/7/2005# AND endDate >= #2/7/2005# ORDER BY eventID
Any help please?!