Try this : $d1=strtotime('d-m-Y',$str); $d2=strtotime('d-m-Y',$str1); var_dump($d2-$d1);
Best regards, Andrey Hristov ----- Original Message ----- From: "Uma Shankari T." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 19, 2002 10:50 AM Subject: [PHP] Difference between two dates > > > Hello, > > How can i find out the difference between two dates. > > I am having the date like this > > $str="10-01-2001"; > $str1="01-02-2002"; > > I need to find out the difference between the date,month and year. > > If anyone know the solution for this problem plz tell me > > > -Uma > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php