• Post Reply Bookmark Topic Watch Topic
  • New Topic

Convert Time to String  RSS feed

 
Amruta Jegarkal
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How I can convert java.sql Time to string in java?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16059
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can format it using a SimpleDateFormat object, just like you would do with a normal java.util.Date object.

Note that java.sql.Time is a subclass of java.util.Date.
 
Amruta Jegarkal
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!