Ver Mensaje Individual
  #4 (permalink)  
Antiguo 12/05/2009, 08:49
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: ayuda con formato de horas

Código mysql:
Ver original
  1. mysql> select tiem tiempo from tiempo;
  2. +----------+
  3. | tiempo   |
  4. +----------+
  5. | 17:09:07 |
  6. | 17:09:11 |
  7. | 17:09:14 |
  8. | 13:53:24 |
  9. | 00:20:32 |
  10. +----------+
  11. 5 rows in set (0.00 sec)
  12.  
  13. mysql> select
  14. if(hour(tiem)=00 and minute(tiem) <> 00 and second(tiem) <>00,
  15. replace(tiem,'00','24'),tiem) tiempo from tiempo;
  16. +----------+
  17. | tiempo   |
  18. +----------+
  19. | 17:09:07 |
  20. | 17:09:11 |
  21. | 17:09:14 |
  22. | 13:53:24 |
  23. | 24:20:32 |
  24. +----------+
  25. 5 rows in set (0.00 sec)

Podría ser algo así.


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

Última edición por huesos52; 12/05/2009 a las 08:54