Get First Day from Request:
$originalDate = $_REQUEST[‘date’];
$newDate = date(“Y-m-d”, strtotime($originalDate));
Get Second Day from Request:
$endDate = $_REQUEST[‘date2’];
$toDate = date(“Y-m-d”, strtotime($endDate));
Get Difference between days:
$date_diff = (strtotime($toDate)- strtotime($newDate))/24/3600;