Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Lost Milliseconds when getting timestamp from database

843853Jun 29 2001 — edited Sep 9 2002
I store a timestamp in DB2 by formatting the current timestamp using the following format mask :
"yyyy-MM-dd-H.mm.ss.SSS". I query the database and the milliseconds are there. When I retrieve a resultset from the database and get the column using rs.getTimestamp(), I reformat it using the same formatting mask and LOSE all the milliseconds. I believe I'm losing the milliseconds when I execute the getTimestamp() method. What do I have to do to get the entire timestamp from the database, including the milliseconds?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 7 2002
Added on Jun 29 2001
5 comments
2,532 views