Ver Mensaje Individual
  #3 (permalink)  
Antiguo 10/06/2011, 10:42
Avatar de memoadian
memoadian
Colaborador
 
Fecha de Ingreso: junio-2009
Ubicación: <?php echo 'México'?>
Mensajes: 3.696
Antigüedad: 15 años, 7 meses
Puntos: 641
Respuesta: Obtener fecha en formato español DD:MM:AAAA

A ver si te sirve esta función

Código PHP:
Ver original
  1. function fechaesp($date) {
  2.         $dia = explode("-", $date, 3);
  3.         $year = $dia[0];
  4.         $month = (string) (int) $dia[1];
  5.         $day = (string) (int) $dia[2];
  6.         $dias = array("dom", "lun", "mar", "mi&eacute;r", "jue", "vie", "s&aacute;b");
  7.         $tomadia = $dias[intval((date("w", mktime(0, 0, 0, $month, $day, $year))))];
  8.         $meses = array("", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre");
  9.         return $tomadia . ", " . $day . " de " . $meses[$month] . " de " . $year;
  10.     }

arreglala como te parezca mejor