i have two dates for example
08/11/2004 and 10/11/2004
i want compare the number of days between these two dates. in the above there are 2 days before its is the 10/11/2004.
i tried this and it does'nt work. gives the wrong number of days
Code: Select all
<?php
$var_from_todayd = date("d");
$var_from_todaym = date("m");
$var_from_todayy = date("Y");
$var_to_todayd = date("d",strtotime($get_school_longestP['t_edate']));
$var_to_todaym = date("M",strtotime($get_school_longestP['t_edate']));
$var_to_todayy = date("Y",strtotime($get_school_longestP['t_edate']));
$diffP=abs(mktime(0,0,0,$var_from_todaym,$var_from_todayd,$var_from_todayy)-mktime(0,0,0,$var_to_todaym,$var_to_todayd,$var_to_todayy))/(86400);
?>