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(
相關文章
相關標籤/搜索