I never saw the original post, but you'll want to use the TO_DAYS() function
in your query.

SELECT TO_DAYS(leave_to) - TO_DAYS(leave_from) AS Num_Days FROM your_table

---John Holmes...

----- Original Message -----
From: "Lazor, Ed" <[EMAIL PROTECTED]>
To: "'Jack'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, June 20, 2002 12:53 PM
Subject: RE: [PHP] Date Comparsion


> Check out the date() and mktime() functions.
>
> > -----Original Message-----
> > 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?
>
>
>
****************************************************************************
> This message is intended for the sole use of the individual and entity to
> whom it is addressed, and may contain information that is privileged,
> confidential and exempt from disclosure under applicable law.  If you are
> not the intended addressee, nor authorized to receive for the intended
> addressee, you are hereby notified that you may not use, copy, disclose or
> distribute to anyone the message or any information contained in the
> message.  If you have received this message in error, please immediately
> advise the sender by reply email and delete the message.  Thank you very
> much.
>
> --
> 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

Reply via email to