Steve Ruby writes:
> 
> 
> For over a year the topic of mathematical operations on date values
> has been disussed. It has never been possible to perform such math
> on a date value without using DATE_ADD or converting the to days or
> seconds first.
> 
> Why is this now all the sudden a reasonable bug?
> 
> Aurelian:
> I suggest that you use DATE_ADD, I'm quite sure what you have found
> is not a bug 
> 20010501 - 1 = 20010500
> 
> MySQL sees CURRENT_DATE as the value 20010501 and performs your subtraction
> as requested, if you want to subtract a day from today I suggest
> DATE_ADD( CURRENT_DATE, INTERVAL -1 DAY )
> 
> Or the previously suggested TO_DAYS, FROM_DAYS method.
> 


You are right, of course !


Regards,

Sinisa

      ____  __     _____   _____  ___     ==  MySQL AB
     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sinisa Milivojevic
    /*/ /*/ /*/   \*\_   |*|   |*||*|     mailto:[EMAIL PROTECTED]
   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Larnaca, Cyprus
  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____
  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^
             /*/             \*\                Developers Team

---------------------------------------------------------------------
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

Reply via email to