![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
17/03/2005, 09:47
|
![Avatar de Seppo](http://static.forosdelweb.com/customavatars/avatar93639_1.gif) | | | Fecha de Ingreso: marzo-2005 Ubicación: Buenos Aires, Argentina
Mensajes: 1.284
Antigüedad: 19 años, 11 meses Puntos: 17 | |
para comparar fechas es mejor usar to_days que te cuenta los días desde el 1/1/1970
"SELECT * FROM tabla1 tr, tabla 2trm
WHERE trm.cdmaterial = '$cdmaterial'
AND to_days(tr.feinicio) <= to_days('$fecha1')
AND to_days(tr.fefin) >= to_days('$fecha1')" |