You'll want to build an HTML form with some date fields, either 3 dropdowns or use something like a jQueryUI datepicker.
Don't forget to validate your input!
Then when that's posted, you can create an sql WHERE clause from it. Then you can connect to your database and pull out the data.
Then you have a choice of just looping the data and outputting the list to the screen, and having the user save it as a CSV. Or you can buffer the output using something like ob_start() outputting your data, then assigning it to a variable using ob_get_flush() and then ouputting some CSV headers using header() and passing it out as a file.
Have a google around, there are lots of tutorials for creating CSV files.