Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

convert SQL TimeStamp to String

 
shabarish vai
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do i convert SQL TimeStamp to String
22-05-20-2008 14:04:59:612
 
Campbell Ritchie
Sheriff
Posts: 48440
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go through the API documentation and look for the toString method, as a first stage.
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.sql.Timestamp is a subclass of java.util.Date, so you can use java.text.DateFormat for formatting it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic