Ver Mensaje Individual
  #3 (permalink)  
Antiguo 23/07/2011, 14:40
Avatar de andresdzphp
andresdzphp
Colaborador
 
Fecha de Ingreso: julio-2011
Ubicación: $this->Colombia;
Mensajes: 2.749
Antigüedad: 12 años, 9 meses
Puntos: 793
Respuesta: Problema al validar dos fechasH

Que tal parce te dejo un ejemplo que acabo de hacer para que te puedas guiar.

Código PHP:
Ver original
  1. <?php
  2.  
  3. $fecha_v = strtotime('02/01/2008');
  4. $fecha_e = strtotime('01/06/2011');
  5.  
  6. if ($fecha_v <= $fecha_e) {
  7.     $fecha_valida = $fecha_e;
  8.     echo date('d-m-Y', $fecha_valida);
  9. } else {
  10.     $fecha_valida = $fecha_v;
  11.     echo date('d-m-Y', $fecha_valida);
  12. }