Ver Mensaje Individual
  #3 (permalink)  
Antiguo 16/09/2016, 12:28
pithon
 
Fecha de Ingreso: mayo-2011
Mensajes: 1.201
Antigüedad: 13 años
Puntos: 10
Respuesta: saber si fecha esta en un intervalo de tiempo

Cita:
Iniciado por ArturoGallegos Ver Mensaje
deberias consultar mas seguido en google y/o la documentacion oficial de PHP

esto es algo bastante sencillo

Código PHP:
Ver original
  1. <?php
  2.  
  3. $varDade = '2000-09-16 00:00:00';
  4.  
  5. if (strtotime($varDade) >= strtotime('-2 years')) {
  6.     # dentro de los ultimos 2 años
  7. }else{
  8.     # fuera del rango
  9. }
me funciono perfecto,gracias.