>>>>>>>>>>>> Nicolas Dufour wrote (2005-09-26 15:15:23):
> Bernt M. Johnsen wrote:
>
> >
> >{ts 'yyyy-mm-dd hh:mm:ss.f...'}
> >
> >Which should work for any conformat JDBC driver
> >
> >
> so any other format like mm/dd/yyyy hh:mm:ss for example will not be
> inserted right ???
> or is it a way to avoid this problem ?
Both the JDBC escape format
{ts 'yyyy-mm-dd hh:mm:ss'}
and the Derby builtin
timestamp('yyyy-mm-dd hh:mm:ss')
is conformant with ISO-8601
The escape format is conformant with the JDBC spec
The builtin is nearly conformant with the SQL standard
(it should have been
timestamp 'yyyy-mm-dd hh:mm:ss'
....)
Any other date/time syntax will need to be converted by some means.
Note however that there also are the classes
java.sql.Date
java.sql.Time
java.sql.Timestamp
which may be used to insert dates/times into Derby
--
Bernt Marius Johnsen, Database Technology Group,
Sun Microsystems, Trondheim, Norway
pgpoRnsKy2C8j.pgp
Description: PGP signature
