Использовал это:)
$days = (strtotime($endDate) - strtotime($startDate)) / (60 * 60 * 24); print $days;
Теперь он работает