Check out http://www.php.net/manual/en/ref.datetime.php look in the answer below, I 
found a couple of support function that might
help you.

Like this one:

function dayDiff($timestamp1,$timestamp2) {
                            $dayInYear1 = getDayOfYear($timestamp1);
                            $dayInYear2 = getDayOfYear($timestamp2);
                            return ((getYear($dayInYear1)*365 + $dayInYear1) -
                                            (getYear($dayInYear2)*365 + $dayInYear2));
                    }


> -----Original Message-----
> From: Jack [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 18, 2002 11:25 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: [PHP-WIN] Date Comparsion
>
>
> Dear all
> I had a form which let user to input the leave_from and leave_to date into,
> the format of the date that user input is "yyyy-mm-dd".
> Now i want to compare the leave_from and leave_to date to find out the
> number of days between!
>
> What should i do or any function in php can provide this operation?
>
>
> --
> Thx a lot!
> Jack
> [EMAIL PROTECTED]
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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

Reply via email to