File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Date/Timestamp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Date/Timestamp" Watch "Date/Timestamp" New topic


Kunal Sathe
Ranch Hand

Joined: Apr 08, 2005
Posts: 49
I have a java program which reads data from an Oracle Database and inserts it into DB2. The reading part is working perfectly fine. However, while inserting the data into DB2, it gives me the following error: [IBM][CLI Driver] CLI0114E Datetime field overflow. SQLSTATE=22008 [IBM][CLI Driver] CLI0114E Datetime field overflow. SQLSTATE=22008

After doing some research, I have come to the conclusion that the error might be due to the fact the I am trying to insert values of the type Timestamp into the DB2 table which expects values of the type Date.

Please correct me if I am wrong.

However, if the above is true, could someone suggest a way in which I can convert the Timestamp values into Date values.

I would really appreciate if someone could point me into the right direction.

Paul Clapham

Joined: Oct 14, 2005
Posts: 19692

I always have to look in the API documentation for things like that too. But there aren't many constructors available for Date so it's pretty easy:
Kunal Sathe
Ranch Hand

Joined: Apr 08, 2005
Posts: 49
Thanks Paul.

I shall try it out.
I agree. Here's the link:
subject: Date/Timestamp
It's not a secret anymore!