Ver Mensaje Individual
  #2 (permalink)  
Antiguo 19/01/2011, 07:05
Hidek1
Colaborador
 
Fecha de Ingreso: octubre-2009
Ubicación: Tokyo - Japan !
Mensajes: 3.867
Antigüedad: 14 años, 6 meses
Puntos: 334
Respuesta: ¿cómo podría obtener los minutos trancurridos entre 2 fechas?

Aunque ya se ha hablado infinitas veces sobre el tema

Código PHP:
$fecha1 '19/01/2011 10:00';
$fecha2 '19/01/2011 10:05';

function 
getMinuts($fecha1$fecha2)
{
    
$fecha1 str_replace('/''-'$fecha1);
    
$fecha2 str_replace('/''-'$fecha2);
    
$fecha1 strtotime($fecha1);
    
$fecha2 strtotime($fecha2);
    return 
round(($fecha2 $fecha1) / 60);
}
echo 
getMinuts($fecha1$fecha2); 
saludos.