Answers for "php time passed since date"

PHP
0

php time passed since date

$now = new DateTime;
$ago = new DateTime($someTimeAgo);
$diff = $now->diff($ago);
$formattedTime = $diff->format('%H:%I:%S');
Posted by: Guest on August-06-2021

Browse Popular Code Answers by Language