PDA

View Full Version : SQL Query - Within Range of Dates


RyanB88
12-18-2009, 09:51 PM
I have a mysql database with a date field, this contains a full date (yyyy-mm-dd) I want have a start date and an end date. I want to select all records where the date field "cf_539" is within the range (either one of those dates or a date that falls in between them). How would the where statement look on such a query?

Old Pedant
12-18-2009, 09:58 PM
SELECT list, of, fields
FROM tablename
WHERE cf_539 BETWEEN '2008-06-01' AND '2010-05-31'