Hi,

----- Original Message ----- 
From: "Alan Williamson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 31, 2004 5:17 PM
Subject: CURDATE() bug?


> Could anyone tell me if this is a bug or not.
>
> SQL:  SELECT CURDATE()+0;
> RESULT: 20040331
>
> Thats good.  However consider this:
>
> SQL:  SELECT CURDATE()+1;
> RESULT: 20040332
>
> Not so good.  Infact with this version any WHERE clauses you would put
> this in, fails to bring back the right result.
>
> Does CURDATE() support numeric addition like this?  Or is the "+0"
> purely a casting-hack to get the right format.  Its not meant as pure
> addition.

Yes, hav a look at http://www.mysql.com/doc/en/Date_and_time_functions.html
for explaination
further for addition, use date_add(curdate(), interval 1 day) or watever


>
> Thoughts?
>
> thanks
>
> alan
>
> -- 
> Alan Williamson, City Planner
>
> w: http://www.BLOG-CITY.com/
> e: [EMAIL PROTECTED]
> b: http://alan.blog-city.com/
>
>
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
>

HTH...
Nitin



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to