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 * from cdr
WHERE calldate BETWEEN '2012-12-01' AND '2012-12-03';
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 * from cdr
WHERE calldate BETWEEN '2012-12-01' AND '2012-12-03';
Try this instead:
Try this query -
The above will work great. If you wanted to add extra conditions, normal Boolean logic works with date/time as well so you could do something like
Just a simple example.