Andre MATOS <[EMAIL PROTECTED]> wrote:
>
> How can I subtract two dates and get the number of days?
>
> (date1 - date2) = days
>
Take a look at TO_DAYS() function:
SELECT TO_DAYS(date1) - TO_DAYS(date2)
or DATEDIFF() function (supported from 4.1.1)
http://dev.mysql.com/doc/mysq
Hi All,
I found a function named TO_DAYS that solved my problem.
Thanks.
Andre
On Sun, 23 May 2004, Andre MATOS wrote:
> Hi,
>
> How can I subtract two dates and get the number of days?
>
> (date1 - date2) = days
>
> Thanks.
>
>
--
Andre Matos
[EMAIL PROTECTED]
--
MySQL General Mail
Hi,
How can I subtract two dates and get the number of days?
(date1 - date2) = days
Thanks.
--
Andre Matos
[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]