$oldDate = '2015-01-01';$seconds = time()-strtotime($oldDate);$a = ceil($seconds / 3600); // 相差多少小时$b = ceil($seconds / 86400); // 相差多少天?>
日期还是时间?timediff(time1,time2)