Don't look at it as a string, you're not searching on a string. What
you are actually searching on is a range of dates, the first of the
month through the end of the month. That will keep your data in a
date format and use the index.
SELECT ... WHERE date between
Brent Baisley wrote:
Don't look at it as a string, you're not searching on a string. What
you are actually searching on is a range of dates, the first of the
month through the end of the month. That will keep your data in a date
format and use the index.
SELECT ... WHERE date between
Hi,
I have a table with a DATE type column and I want to search for more records
that have the same year and month.
I have tried searching with:
select ... where date_format(date, '%Y-%m')='2005-06' ...;
I know that if I apply a function to the date column, the index on that
column is not
Octavian Rasnita wrote:
Hi,
I have a table with a DATE type column and I want to search for more records
that have the same year and month.
I have tried searching with:
select ... where date_format(date, '%Y-%m')='2005-06' ...;
I know that if I apply a function to the date column, the index