Found at http://lists.mysql.com/mysql/225525 that hsv wrote on 12 Aug 2011:
Function TIME yields a string, not any timestamp type, but d is of some
such type.
Unhappily, the HTML help that I downloaded is of no help in this case, when
the result
context has no type, unless it is supposed
2011/08/07 18:20 +0300, Marius Feraru
Would someone please shed some light on what's wrong with calls like
IF( DATE(d) = some-date, TIME(d), d )
on DATETIME columns?
Thank you.
I run some tests on mysql 5.0, 5.1 and 5.5: got the same wierd results
everywhere, so I guess I'm missing
Hello
Would someone please shed some light on what's wrong with calls like
IF( DATE(d) = some-date, TIME(d), d )
on DATETIME columns?
Thank you.
I run some tests on mysql 5.0, 5.1 and 5.5: got the same wierd results
everywhere, so I guess I'm missing something, but what is it?
It looks like
In the last episode (Aug 07), Marius Feraru said:
--
SELECT d, IF( DATE(d)=@rd, DATE_FORMAT(%T,d), d) wtf2 FROM dt
--
+-+-+
| d | wtf2|
+-+-+
|
On Sun, Aug 7, 2011 at 20:34, Dan Nelson dnel...@allantgroup.com wrote:
I think you need to swap your arguments to DATE_FORMAT
Of course, sorry about that stupid example, I was just trying to build
up from the original problem and failed. Thanks :)
The problem still stands though. Any ideas?