|
Upstairs said:
The landlord overlooked a problem, that is, the format of the date converted to a string (yyyy-MM-dd, MM-dd-yyyy.....)
The correct way is:
select *
from table name
where Year (date field) = 2015 and Month (date field) = 7 and Day (date field) = 20
Use the three date functions Year, Month, and Day respectively to find the year, month, and day of the date field. |
|