I wish to store in to the same table, in various posts 2 java.sql.Date objects for their corresponding SQL Datetime. It really works fine, however the hour, minute and seconds are cut down. That's recorded within the javadoc.

For example getting the date: 5/30/2009 14:33:21 AM when placed in table it's cut down to 5/30/2009 12:00:00 AM .

I have also attempted to keep it as being a Timestamp, however i cannot have 2 rows with Timestamp format in to the same table.

It is possible to workaround or something like that ?

Why can't you've several row with Timestamp format? I believe you need to elaborate there (what's your ORM if any, and what's your database server).

Anyhow you may either split the datetime into java.sql.Date and java.sql.Some time and have several of every or use java.sql.Timestamp, that is what does not lose time information by design. So you should consider the reason why you can't have several Timestamp.

To have an SQL DATETIME column you need to still make use of a java.sql.Timestamp and also the statement.setTimestamp( int, java.sql.Timestamp ) method.

The JDBC driver Timestamp class should map to both SQL DATETIME and SQL TIMESTAMP posts.

If you work with Oracle. This short article may help you: