This will give you the difference between the two dates in seconds: $diff = strtotime(str_replace('-','/',$str1)) - strtotime(str_replace('-','/',$str));
-Rasmus On Wed, 20 Feb 2002, Uma Shankari T. wrote: > > > > 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