Hello,
I got the solution for the date difference problem..,,
Thankyou very much.....
-Uma
"Uma Shankari T." <[EMAIL PROTECTED]> wrote:
> 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,
I wrote a function last year that calculates the time between 2 dates in
whatever unit is preferred (everything from seconds to years). My function
expects the date in a slightly different format, but it would be trivial to
switch the order of the date parts in one line and hard-code something for
the hours, minutes and seconds it expects in the date format. It wouldn't
matter what you hardcode them as since it would use the same time of day for
both dates.
http://www.befriend.com/code_gallery/php/get_elapsed_time/
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php