Last active
February 8, 2020 00:41
-
-
Save dragosani24/c972bed0447b18f976bb458b0bea622e to your computer and use it in GitHub Desktop.
PHP: Cálculo de la diferencia de horas entre dos tiempos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $time1 = strtotime('08:00:00'); | |
| $time2 = strtotime('09:30:00'); | |
| $difference = round(abs($time2 - $time1) / 3600,2); | |
| echo $difference; | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment