how to find difference between dates in minutes code example
Example: 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;