How to compare only day and month with date field in mysql? For example, I\'ve a date in one table: 2014-07-10
2014-07-10
Similarly, another date 2000-07-10<
2000-07-10<
Use MONTH and DAY functions:
Try this:
SELECT * FROM tableA a WHERE a.id = 1 AND MONTH(a.field) = MONTH('2000-07-10') AND DAY(a.field) = DAY('2000-07-10')