Timestamp and Informix
370922May 20 2003 — edited May 20 2003I have the following problem:
Java object contains attribute validFrom java.sql.Timestamp
Informix database table has column validFrom DATETIME YEAR TO SECOND
If I modify the column validFrom then TopLink generates
UPDATE oper SET validFrom = {ts '2003-05-20 10:39:58.0'} ...
and Informix returns the error:
EXCEPTION DESCRIPTION: java.sql.SQLException: Extra characters at the end of a datetime or interval.
INTERNAL EXCEPTION: java.sql.SQLException: Extra characters at the end of a datetime or interval.
ERROR CODE: -1264
This error means that the timestamp should be written {ts '2003-05-20 10:39:58'} (without nanos).
How to fix this problem? Is it possible to set the format for timestamps?
Thanks in advance for any help.