Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/03/2012, 14:49
Avatar de CesarHC
CesarHC
 
Fecha de Ingreso: junio-2011
Ubicación: localhost
Mensajes: 566
Antigüedad: 12 años, 11 meses
Puntos: 56
Respuesta: formato de fecha

Ejemplo sacado del manual (QUE DEBIO SER TU PRIMER REFERENCIA ).

Código PHP:
Ver original
  1. <?php
  2. // Se asume que hoy es March 10th, 2001, 5:16:18 pm, y que estamos en la
  3. // zona horaria Mountain Standard Time (MST)
  4.  
  5. $today = date("F j, Y, g:i a");                 // March 10, 2001, 5:16 pm
  6. $today = date("m.d.y");                         // 03.10.01
  7. $today = date("j, n, Y");                       // 10, 3, 2001
  8. $today = date("Ymd");                           // 20010310
  9. $today = date('h-i-s, j-m-y, it is w Day');     // 05-16-18, 10-03-01, 1631 1618 6 Satpm01
  10. $today = date('\i\t \i\s \t\h\e jS \d\a\y.');   // it is the 10th day.
  11. $today = date("D M j G:i:s T Y");               // Sat Mar 10 17:16:18 MST 2001
  12. $today = date('H:m:s \m \i\s\ \m\o\n\t\h');     // 17:03:18 m is month
  13. $today = date("H:i:s");                         // 17:16:18
  14. ?>

Siempre revisa primero la fuente antes de preguntar.
Saludos.
__________________
Solo la práctica no te traicionara ¡¡¡¡¡¡

Seguir el camino tu debes PHP The Right Way.