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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 60048
    
  65

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
 
Similar Threads
truncation errors storing a Date in MySQL table
Converting "Mon Nov 24 00:00:00 EST 2008" pattern to "dd/MM/yyyy" pattern
Has the limit for voucher in 141 crossed
Calendar() / Date() bug ???
[META/cxf/cxf.xml] cannot be opened because it does not exist