I have this query, i need to select all records between two dates, the mysql table is a datetime format.
I tried this but it didn\'t work.
select * f
Try this query -
SELECT * FROM cdr WHERE calldate BETWEEN str_to_date('2012-12-01','%Y-%m-%d') AND str_to_date('2012-12-03','%Y-%m-%d');