Mysql
 sql >> Database >  >> RDS >> Mysql

Trova la differenza tra due date in PHP o MySQL

<?php
$diff = strtotime('2010-03-04 13:24:58') - strtotime('2009-09-24 21:09:36');
echo "Difference is $diff seconds\n";
$days = floor($diff/(3600*24));
echo "Difference is $days days\n";