I have this simple sql statement:
UDPATE activity SET activity_date = '9.10.2003 10:00:00', type_no = 1 WHERE DATE_FORMAT(activity_date,'%d.%m.%Y %H:%i') = '09.10.2003 10:00' AND type_no = 1;
I'm not able to execute the query. It seems that the <SET activity_date = '9.10.2003 10:00:00'>
portion is not valid. <activity_date> is a DATETIME field.
Any idea?
What do you mean by "is not valid"? The comparison doesn't work? The correct value doesn't get stored into the row?
In any case, if activity_date really is a DATETIME column, you must store values in it using 'YYYY-MM-DD hh:mm:ss' format, not in the format you store above.
If activity_date is *not* really a DATETIME column, but is stored using values in 'DD.MM.YYYY hh:ss' format, then DATE_FORMAT() will not work correctly.
-- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com
Are you MySQL certified? http://www.mysql.com/certification/
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]