I have a duedate
column(datetime
format) that specifies the due date of a ticket, now i need to get \'Due today\' tickets base on the comparison be
Compare date only instead of date + time (NOW) with:
CURDATE()
Use DATE(NOW())
to compare dates
DATE(NOW())
will give you the date part of current date and DATE(duedate)
will give you the date part of the due date. then you can easily compare the dates
So you can compare it like
DATE(NOW()) = DATE(duedate)
OR
DATE(duedate) = CURDATE()
See here