Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JDBC and Relational Databases and the fly likes insert Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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: 62596
    
  68

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