0
$expiredate='2009/03/31';
$cdate='2009/03/03';
$dateDiff = $expiredate - $cdate;
$fullDays = floor($dateDiff/(60*60*24));

the above method i am using to find the difference between two date.but it is not working.can any one tell me how to find the difference using php.

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by queenc
0

thanks i got it

$expiredate=strtotime("2009-04-03");
$cdate=strtotime("2009-03-31");
$dateDiff = $expiredate - $cdate;
$fullDays = floor($dateDiff/(60*60*24));
echo $fullDays ;
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.