![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
01/04/2007, 19:28
|
| | Fecha de Ingreso: marzo-2007
Mensajes: 6
Antigüedad: 17 años, 10 meses Puntos: 0 | |
Re: Cambiar fechas dd-mm-yyyy(PHP) a yyyy-mm-dd(MySql) Encontre una manera más amigable de lograr insertarla es la siguiente:
$fecha=$_POST['fecha']
$fch=explode("/",$fecha);
$fecha=$fch[2]."-".$fch[1]."-".$fch[0];
para pasar a a mysql
INSERT INTO tabla VALUES ('campo1','$fecha','campo2')
Gracias por su ayuda y comparto el código por si alguen lo necesita |