If i gave the str date as "31-01-2001"; and  $str1="04-02-2001"; then it
is displaying the wrong result

Plz tell me how can i rectify this problem...


-Uma

 




On Tue, 19 Feb 2002, Rasmus Lerdorf wrote:

RL>This will give you the difference between the two dates in seconds:
RL>
RL>$diff = strtotime(str_replace('-','/',$str1)) - 
strtotime(str_replace('-','/',$str));
RL>
RL>-Rasmus
RL>
RL>On Wed, 20 Feb 2002, Uma Shankari T. wrote:
RL>
RL>>
RL>>
RL>>
RL>>  Hello,
RL>>
RL>>      How can i find out the difference between two dates.
RL>>
RL>> I am having the date like this
RL>>
RL>> $str="10-01-2001";
RL>> $str1="01-02-2002";
RL>>
RL>> I need to find out the difference between the date,month and year.
RL>>
RL>> If anyone know the solution for this problem plz tell me
RL>>
RL>>
RL>> -Uma
RL>>
RL>>
RL>>
RL>> --
RL>> PHP General Mailing List (http://www.php.net/)
RL>> To unsubscribe, visit: http://www.php.net/unsub.php
RL>>
RL>

-- 

Love and you shall be loved by others


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to