db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Libor Jelinek <ljeli...@virtage.com>
Subject Milisecond support?
Date Thu, 05 Apr 2012 13:16:50 GMT
Hello all,
does Derby TIMESTAMP data type support millisecond? In reference manual (
http://db.apache.org/derby/docs/10.8/ref/rrefsqlj27620.html) is stated:

*yyy-mm-dd hh:mm:ss[.nnnnnn]
yyyy-mm-dd-hh.mm.ss[.nnnnnn]*

*The first of the two formats above is the java.sql.Timestamp format.*

*The year must always have four digits. Months, days, and hours may have
one or two digits. Minutes and seconds must have two digits. Nanoseconds,
if present, may have between one and six digits.*
However because 1 millisecond = 1 000 000 nanoseconds even 1 millisecond
can't be stored because it has 7 digis (max is 6)...

Also, IMHO because 1 second = 1 000 000 000 nanoseconds, so nanosecond part
should have 9 digits, not 6. Also,
http://docs.oracle.com/javase/7/docs/api/java/sql/Timestamp.html#setNanos(int)expect
that nano part will have max 9 digits.

Thanks for your comments.

--
Hezky den / Have a nice day
Libor JEL├ŹNEK

VIRTAGE SOFTWARE // software - design - web
Lucni 542 // 285 04 Uhlirske Janovice // Czech Republic
support: +420 315 555 488 // cell: +420 777 205 142
email/jabber: ljelinek@virtage.com // web: www.virtage.com

Visit our developer adventures at http://devblog.virtage.com!

Mime
View raw message