File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes insert Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "insert "Thu Nov 15 00:00:00 EST 2012" to timestamp field of db2" Watch "insert "Thu Nov 15 00:00:00 EST 2012" to timestamp field of db2" New topic
Author

insert "Thu Nov 15 00:00:00 EST 2012" to timestamp field of db2

zb cong
Ranch Hand

Joined: Jan 14, 2002
Posts: 416
Hello,

i have a string "Thu Nov 15 00:00:00 EST 2012", how can i insert it into timestamp field in db2 from my java code? thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61420
    
  67

You'll need to convert it to a Date or Timestamp instance.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: insert "Thu Nov 15 00:00:00 EST 2012" to timestamp field of db2