Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $Entrada = strtotime( '2010-05-26 08:00' );
- $Saida = strtotime( '2010-05-26 11:15' );
- $Diferenca = $Saida - $Entrada;
- $hora = $Diferenca/3600;
- $min = $Diferenca/60%60;
- printf( '%d:%d', $hora, $min );
- $Entrada = strtotime( '2010-05-26 08:00' );
- $Saida = strtotime( '2010-05-26 11:15' );
- $Diferenca = $Saida - $Entrada;
- $hora = $Diferenca/3600;
- $min = $Diferenca/60%60;
- $Resultado = printf( '%d:%d', $hora, $min );
- echo $Resultado;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement