
29/04/2011, 01:20
|
Colaborador | | Fecha de Ingreso: marzo-2008 Ubicación: Sabadell
Mensajes: 4.897
Antigüedad: 16 años, 11 meses Puntos: 574 | |
Respuesta: seleccionar registros de una fecha + x dias Manual Cita: DATEDIFF() returns expr1 – expr2 expressed as a value in days from one date to the other. expr1 and expr2 are date or date-and-time expressions. Only the date parts of the values are used in the calculation.
mysql> SELECT DATEDIFF('2007-12-31 23:59:59','2007-12-30');
-> 1
mysql> SELECT DATEDIFF('2010-11-30 23:59:59','2010-12-31');
-> -31
__________________ Quim
--------------------------------------------------
Ayudar a ayudar es una buena práctica!!! Y da buenos resultados. |