Re: Difference between two dates

From: Date: Wed, 20 Feb 2002 03:07:20 +0000
Subject: Re: Difference between two dates
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-85485@lists.php.net to get a copy of this message
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 >

« previous php.general (#85485) next »