Ver Mensaje Individual
  #4 (permalink)  
Antiguo 08/12/2015, 11:23
pilucho
 
Fecha de Ingreso: noviembre-2004
Ubicación: NULL
Mensajes: 652
Antigüedad: 19 años, 5 meses
Puntos: 6
Respuesta: Cambiar Fecha YYYY-mm-dd a 0000-ene, 0000-feb...

Cita:
Iniciado por hhs Ver Mensaje
Utiliza la extensión intl: http://php.net/manual/es/book.intl.php para formatear la fecha,
Código PHP:
Ver original
  1. //creas una instancia para tu region
  2. $fmt = new IntlDateFormatter(
  3.     "es_ES" ,
  4.     IntlDateFormatter::FULL,
  5.     IntlDateFormatter::FULL,
  6.     'America/New_York',
  7.     IntlDateFormatter::GREGORIAN,
  8.     "yyyy'-'MMMM "
  9. );
  10.  
  11. $date = new DateTime('2015-12-24 14:30:10'); //la fecha de tu base de datos
  12.  
  13. echo utf8_decode(ucwords($fmt->format($date), '-')); //2015-Diciembre
Gracias por la respuesta pero hay errores de este tipo ejemplo


Fatal error: Class 'IntlDateFormatter' not found in $fmt = new IntlDateFormatter(