Ver Mensaje Individual
  #4 (permalink)  
Antiguo 14/09/2009, 15:30
Avatar de huesos52
huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 15 años, 2 meses
Puntos: 360
Respuesta: Como realizar operaciones entre fechas en mysql

Código mysql:
Ver original
  1. mysql> select *from fecha;
  2. +---------------------+
  3. | fecha               |
  4. +---------------------+
  5. | 2009-09-14 16:29:16 |
  6. +---------------------+
  7. 1 row in set (0.00 sec)
  8.  
  9. mysql> select date_add(fecha,interval 1 second) from fecha;
  10. +-----------------------------------+
  11. | date_add(fecha,interval 1 second) |
  12. +-----------------------------------+
  13. | 2009-09-14 16:29:17               |
  14. +-----------------------------------+
  15. 1 row in set (0.03 sec)
  16.  
  17. mysql>

utiliza la función date_add

saludos
__________________
Without data, You are another person with an opinion.
W. Edwads Deming