You need to apply DATE_FORMAT in the SELECT , and not in the WHERE :
SELECT DATE_FORMAT(create_date, '%m/%d/%Y') FROM mytable WHERE create_date BETWEEN CURDATE() - INTERVAL 30 DAY AND CURDATE()
Also note that CURDATE() returns only a portion of the DATE date, so if you save create_date as a DATETIME with a filled part of the time, this query will not select today's records.
In this case, use NOW instead:
SELECT DATE_FORMAT(create_date, '%m/%d/%Y') FROM mytable WHERE create_date BETWEEN NOW() - INTERVAL 30 DAY AND NOW()
Quassnoi Jan 11 '10 at 11:57 2010-01-11 11:57
source share