Milosz
|
| Posted: 02/25/2005, 7:22 AM |
|
Hi, I've a problem with this query=
SELECT * FROM calendario
WHERE EXTRACT(YEAR_MONTH FROM data_da) <=EXTRACT(YEAR_MONTH FROM CURDATE())
I think is a format date problem. I use dd/mm/yyyy date display.
|
|
|
 |
PeterJ
Posts: 90
|
| Posted: 02/26/2005, 11:21 AM |
|
Hi
Your date needs to be as yyyy-mm-dd for this to work
|
 |
 |
RonB
Posts: 228
|
| Posted: 02/28/2005, 12:28 PM |
|
SELECT * FROM calendrio
where date_format(data_da ,'%Y-%m') <=date_format( current_date() ,'%Y-%m')
should do the trick
Ron
|
 |
 |
|