Return to Snippet

Revision: 2727
at April 5, 2007 13:15 by nicolaspar


Updated Code
function invertirFecha( $fecha ){
  return implode( "-", array_reverse( preg_split( "/\D/", $fecha ) ) );
}

Revision: 2726
at April 5, 2007 12:54 by nicolaspar


Initial Code
function invertirFecha( $fecha ){
  return implode( "-", array_reverse( explode( "-", $fecha ) ) ) ;
}

Initial URL

                                

Initial Description
De aa-mm-dd a dd-mm-aa y al revé

Initial Title
PHP - Invertir Fecha

Initial Tags
date, format

Initial Language
PHP