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'),"%")
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2e61d-40199.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2e61d-40199.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?