That's not going to work. What if a user enters 2/1 - 2/27 and there are dates in the database 1/2 - 2/25. The record should come up because the database dates 2/1 - 2/25 overlap with the user entered dates 2/1 - 2/27. I might have come up with a solution though. Let me know what you think:
SELECT * FROM <TABLENAME>
WHERE
(USERENTERDATE1 <= DATEFIELD1 AND USERENTERDATE2 >= DATEFIELD2) OR
(USERENTERDATE1 >= DATEFIELD1 AND USERENTERDATE1 <= DATEFIELD2)
|