我必须找到时间戳格式的日期之前的天数(mysql db)
$row['date_exp'] format is '2013-12-16 10:00:00';
$datenow = date("Y-m-d");
$diff = (strtotime($row['date_exp']) - strtotime($datenow))/(86400);
$days = sprintf("%02d", $diff);
我的问题是,如果现在2013-12-01 09:59:00
的日期是 15 天,而现在2013-12-01 10:01:00
的日期是 14 天。
我怎么能只改变没有时间的日子呢?