Home

Tuesday 27 May 2014

How we find difference between two dates

Try this cod


$date1='2010/01/01';
$date2='2011/01/02';
$s1=strtotime($date1);
$s2=strtotime($date2);
$difference = abs($s2 - $s1);
echo $difference/(60*60*24);

1 comment: