File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Date to MySQL Date

 
Tulika Shil
Greenhorn
Posts: 3
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to insert the date into one of the columns of a table in MySQL from my jsp page. The datatype of that column is 'date'. How to convert the Java date to MySQL date?
 
ravi varagani
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Date date = new Date();
SimpleDateFormat sdf = SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String currentdate = sdf.format(date);
The cuurrentdate put into columns.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic