I have a
datetime format) that specifies the due date of a ticket, now i need to get ‘Due today’ tickets base on the comparison between
2010-04-29 02:00 vs
2010-04-29 10:00 would return true in this matter.
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
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)
DATE(duedate) = CURDATE()
Compare date only instead of date + time (NOW) with: