title: Display datetime from database to jsp
body: <p>I inserted time like this in my db:</p>
  
  <pre><code>java.util.Date dt = new java.util.Date();
  java.text.SimpleDateFormat sdf =new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  String currentTime = sdf.format(dt);
  
  Class.forName("com.mysql.jdbc.Driver").newInstance();
  Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/marmota", "root", "root");
  Statement stmt = con.createStatement();
  stmt.executeUpdate("INSERT INTO bids(id, bidder, time, price) VALUES ('" +id + "','" + username + "','" + currentTime + "','" + price + "')");
  </code></pre>
  
  <p>With <code>getString("something")</code> you can get a string from db. But how can I get the currentTime I inserted?</p>
  
  <p>Note : I save currentTime as DATETIME into my db.</p>