Compare dates in MySQL

后端 未结 5 1863
野性不改
野性不改 2020-11-27 03:31

I want to compare a date from a database that is between 2 given dates. The column from the database is DATETIME, and I want to compare it only to the date format, not the d

5条回答
  •  我在风中等你
    2020-11-27 04:19

    You can try below query,

    select * from players
    where 
        us_reg_date between '2000-07-05'
    and
        DATE_ADD('2011-11-10',INTERVAL 1 DAY)
    

提交回复
热议问题