How to get start date and end dates in a query from database.
http://sqltutorials.blogspot.com/2007/06/sql-first-and-last-day-of-month.html
Only thing that isn't covered is how to retrieve the current date... see rexem's post.