Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

change sql date to simpledateformat (mm/dd/yyyy)  RSS feed

 
harish pathak
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All, I am retrieving date from the database in the following format : 2006-08-09 09:12:14:0 I have to change it in the mm/dd/yyyy format .. How can I do it in java answer please Thanks
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
new SimpleDateFormat("mm/dd/yyyy").format(yourDateFromDatabase);

By the way, your question has nothing to do with JSP. Please use the Java Beginner forum for your Java Queries.
[ August 17, 2006: Message edited by: Lynette Dawson ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!