php计算两个时间(日期)相差的天数、小时数、分钟数、秒数

$startdate="2011-3-15 11:50:00";//开始时间 $enddate="2012-12-12 12:12:12";//结束时间 $date=floor((strtotime($enddate)-strtotime($startdate))/86400); echo "相差天数:".$date."天<br><br>"; $hour=floor((strtotime(
相关文章
相关标签/搜索