SQLQuery update to set a date lazarus / 16-Databases ---------------------------------------------------------------------- gambothell · 2009-02-13 18:24 I am using v0.9.24 and Ubuntu 8.10 I am using SQLQuery with update to update the MySQL fields. I can update all my data type except for Date. I have tried: UPDATE tablename                   SET DateFieldName = '1999-2-15' ---------------------------------------------------------------------- gambothell · 2009-02-13 18:34 I posted before finishing... sorry As I stated, I am trying to update a date field in MySQL using a SQLQuery. When the user updates a data field I have tried the following: update Tablename set DateFieldName = '1999-1-15' where ID = 27 This gives me a syntax error. I have also tried entering the date as '1999-1-15 12:00:00' with same results. I also have tried to use parms, but my understanding is that parms are not implemented. So the question is how do you update a date field using a set statement? thanks for your assistance ---------------------------------------------------------------------- gambothell · 2009-02-13 21:48 I figured it out. You need to use the DATE function on the set statement update TableName set DateField = DATE('YYYY-MM-DD') where FieldName = xxx This works great. ---------------------------------------------------------------------- Loesje · 2009-02-13 22:26 Also, in fpc 2.2.2 (Lazarus 0.9.26) parameters for MySQL are implemented.