Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/01/2014, 11:57
Avatar de bandolera
bandolera
 
Fecha de Ingreso: abril-2009
Mensajes: 613
Antigüedad: 15 años
Puntos: 7
Pregunta MYSQL Cambiar formato fecha

Tengo una tabla con el campo fecha varchar(10) que tiene el siguiente formato:
14/02/2012
Y para poder pasarlo a formato date estoy usando lo siguiente:
Código PHP:
UPDATE tabla SET nueva_fecha=STR_TO_DATE(fecha%d/%m/%y’); 
pero sale un error de sintaxis:
Código PHP:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%m/%y’)' at line 1 
__________________
Todos somos iguales. NO! a la violencia de género.