Select all records between two datetime format

前端 未结 3 530
北海茫月
北海茫月 2021-01-12 20:19

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         


        
3条回答
  •  情话喂你
    2021-01-12 20:42

    Try this instead:

    select * from cdr
    WHERE DATE(calldate) BETWEEN '20121201' AND '20121203';
    

提交回复
热议问题