This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes convert  SQL TimeStamp to String 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 » Java » Java in General
Bookmark "convert  SQL TimeStamp to String" Watch "convert  SQL TimeStamp to String" New topic
Author

convert SQL TimeStamp to String

shabarish vai
Ranch Hand

Joined: May 26, 2008
Posts: 79
how do i convert SQL TimeStamp to String
22-05-20-2008 14:04:59:612
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38075
    
  22
Go through the API documentation and look for the toString method, as a first stage.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19656
    
  18

java.sql.Timestamp is a subclass of java.util.Date, so you can use java.text.DateFormat for formatting it.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: convert SQL TimeStamp to String
 
Similar Threads
String to Timestamp conversion
time conversion
Problem with TIMESTAMP(6) WITH LOCAL TIME ZONE
convert data type string to timestamp
Create a Date object from String