Answers for "Find difference between two dates in minutes"

0

Find difference between two dates in minutes

$time = new DateTime("2012-09-21 12:12:22");
$diff = $time->diff(new DateTime());
$minutes = ($diff->days * 24 * 60) +
           ($diff->h * 60) + $diff->i;
Posted by: Guest on May-26-2021

Code answers related to "Find difference between two dates in minutes"

Browse Popular Code Answers by Language