How does mybatis match the year, month and day of the date field?

first, there is a field of Date type in the database. If you want to query all the records of 2018-04-08, but ignore the following time, minutes and seconds, how do you write the query statement and the mybatis mapping file?

Mar.01,2021

SELECT * FROM table T WHERE T.publish_date >= DATE_FORMAT(NOW(),'%Y-%d-%m');

can you realize it with a different way of thinking?

. Where publish_date between '20180408000000' and' 20180407235959'


the date of yyyy-MM-dd HH:mm:ss can be queried by the following methods:

a.returnTime  like  concat(DATE_FORMAT(-sharp{entity.returnTime},'%Y-%m-%d'),"%")
Menu