You can use MySQL’s DATE()
function:
WHERE DATE(datetime) = '2009-10-20'
You could also try this:
WHERE datetime LIKE '2009-10-20%'
See this answer for info on the performance implications of using LIKE
.
More Related Contents:
- MySQL Query GROUP BY day / month / year
- Error in MySQL when setting default value for DATE or DATETIME
- Difference between two dates in MySQL
- mysql: get record count between two date-time
- How to cast DATETIME as a DATE in mysql?
- MySQL – select data from database between two dates
- How to compare timestamp dates with date-only parameter in MySQL?
- Working with INTERVAL and CURDATE in MySQL
- Should I use the datetime or timestamp data type in MySQL?
- Get a list of dates between two dates
- How do you set a default value for a MySQL Datetime column?
- How to populate a table with a range of dates?
- How to group by week in MySQL?
- Mysql: Setup the format of DATETIME to ‘DD-MM-YYYY HH:MM:SS’ when creating a table
- How to store a datetime in MySQL with timezone info
- Select mysql query between date?
- Datetime equal or greater than today in MySQL
- Group mysql query by 15 min intervals
- How to convert time to the time zone of the iPhone device?
- Select data between a date/time range
- How to get first day of every corresponding month in mysql?
- How to convert ISO8601 to Date format in php
- Compare only day and month with date field in mysql
- How to select only date from a DATETIME field in MySQL?
- Select all months within given date span, including the ones with 0 values
- Insert/ Update random date in MySQL
- how to partition a table by datetime column?
- Get total hours worked in a day mysql
- MySQL select all rows from last month until (now() – 1 month), for comparative purposes
- MySQL – How to parse a string value to DATETIME format inside an INSERT statement?