> > RTFM!
> and what was the reason for this rudeness? Can't you explain yourself
> without descending into this sort of language?
My apologies for any rudeness, English is not my first language and I'm used
to using this abbreviation to indicate that it can be found in the manual.
> I do read th
RTFM!
and what was the reason for this rudeness? Can't you explain yourself
without descending into this sort of language?
I do read the manual, and it is this reason i posted to the list.
Clarity is a wonderful thing, and sadly the manual isn't clear on this
matter.
I stand by my original s
- Original Message -
From: "Alan Williamson" <[EMAIL PROTECTED]>
To: "Jigal van Hemert" <[EMAIL PROTECTED]>
Sent: Wednesday, March 31, 2004 2:05 PM
Subject: Re: CURDATE() bug?
> Jigal van Hemert wrote:
>
>
> > NOT A BUG!!!
> >
> &g
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
> 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 rig
> 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 rig
> 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 rig
I would say that the CURDATE is converted to an integer because of +0.
Since if you add 1 to a date, should that increment years/months/days/
or seconds ?
Use the DATE_ADD(date,INTERVAL expr type) functions instead.
cheers
mike
-Original Message-
From: Alan Williamson [mailto:[EMAIL PROT
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