Hi,
My intention is to get the datedifference(in no of days) between
the
current date and a previously entered date which is in a table(of
course
this date is lower in value than the current date).When I used this
query:
select FROM_DAYS(TO_DAYS(CURDATE()) - TO_DAYS('2001-08-30'));
Here the problem comes is that it is checks first the year,then the
month
and then the days;and if anywhere it finds that the difference is a
negative
value,it prints as follows:
-----------------------------------------------------+
FROM_DAYS(TO_DAYS(CURDATE()) - TO_DAYS('2001-08-30'))
-----------------------------------------------------+
0000-00-00 |
-----------------------------------------------------+
So how can I rectify this problem?
Abhilash
---------------------------------------------
This message was sent using Endymion MailMan.
http://www.endymion.com/products/mailman/
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php