Ver Mensaje Individual
  #5 (permalink)  
Antiguo 17/10/2009, 15:00
Avatar de huesos52
huesos52
Colaborador
 
Fecha de Ingreso: febrero-2009
Ubicación: Manizales - Colombia
Mensajes: 5.980
Antigüedad: 16 años
Puntos: 360
Respuesta: seleccionar rangos y expresiones regulares

así:


Código mysql:
Ver original
  1. mysql> select str_to_date('21:12:2009','%d:%m:%Y');
  2. +--------------------------------------+
  3. | str_to_date('21:12:2009','%d:%m:%Y') |
  4. +--------------------------------------+
  5. | 2009-12-21                           |
  6. +--------------------------------------+
  7. 1 row in set (0.07 sec)
  8.  
  9. mysql>

la función str_to_date convierte la cadena a una fecha reconocida por mysql.

debes usarla
Código sql:
Ver original
  1. BETWEEN str_to_date(fecha,'%d:%m:%Y') AND BETWEEN str_to_date(fecha2,'%d:%m:%Y')
__________________
Without data, You are another person with an opinion.
W. Edwads Deming