jQuery in Action, 2nd edition*
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 Android Security Essentials Live Lessons this week in the Android 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: 60800
    
  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
Calendar() / Date() bug ???
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
[META/cxf/cxf.xml] cannot be opened because it does not exist