• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String to Timestamp conversion

 
amit prajapati
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,

I am facing problem in converting String to Time stamp.



How can i convert into Timestamp from String object when i Update the DB ?

Regards,
Amit P.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34669
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use SimpleDateFormat in Java to build a Date object (which parses your string) and then convert that to a Timestamp.
 
steve davis
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a SimpleDateFormat with an appropriate format string (be careful to use the correct format letters, uppercase and lowercase have different meanings!).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic