Lost Milliseconds when getting timestamp from database
843853Jun 29 2001 — edited Sep 9 2002I 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?