What form are the $depdate and $arrdate variables in? What kind of column types are the two date columns in your DB?
If you have a date in the form of 'YYYY-MM-DD' and you have a DATE column in your DB, you can actually just use something similar to what you have:
SELECT ... WHERE `depdate_field` < '$depdate' AND `arrdate_field` > '$arrdate'