Problem with date in Mysql
Posted: Tue Mar 11, 2008 4:07 am
HI all...
I have a small problem here ...
I have a table and a date field and it is stored in the format as 'YYYY-MM-DD'.
Now i want to retrieve the rows between some date .Like
select * from table_name where date >='2006-12-22' and date<='2008-02-22'
up to now i had successfully done this job but i dont want the date results ...
it is giving the all results.I want only year and month results.Please help how to do this
is there any function in mysql like date>='2007-12-%'
The % should compare with any of the date within that month
Please help
Thanks in Advance...
I have a small problem here ...
I have a table and a date field and it is stored in the format as 'YYYY-MM-DD'.
Now i want to retrieve the rows between some date .Like
select * from table_name where date >='2006-12-22' and date<='2008-02-22'
up to now i had successfully done this job but i dont want the date results ...
it is giving the all results.I want only year and month results.Please help how to do this
is there any function in mysql like date>='2007-12-%'
The % should compare with any of the date within that month
Please help
Thanks in Advance...