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 | > +---------------------+---------------------+ > | 2011-08-07 10:11:12 | NULL | > | 1234-05-06 07:08:09 | 1234-05-06 07:08:09 | > +---------------------+---------------------+ > 2 rows in set, 1 warning (0.01 sec) > > Warning (Code 1292): Incorrect datetime value: '%T'
I think you need to swap your arguments to DATE_FORMAT. The date comes first, then the format string. -- Dan Nelson dnel...@allantgroup.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org