5
(1)

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;

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.