title: Insert datetime to database
body: <pre><code>Date currentDateTime;
  java.sql.Date sql_currentDateTime;
  currentDateTime = getCurrentDateTime(); //Fri Jun 21 15:53:59 AZST 2013
  sql_currentDateTime = new java.sql.Date(currentDateTime.getTime()); //2013-06-21
  
  PreparedStatement insertStmt = null;
  sqlToMessage = "insert into message values (?)";
  insertStmt = conn.prepareStatement(sqlToMessage);
  insertStmt.setDate(1, sql_currentDateTime);
  insertStmt.executeUpdate();
  </code></pre>
  
  <p>I want to insert current date time (20-Jun-13 16:04:32) into database. But data inserted to database like that <code>20-Jun-13</code>, not like <code>20-Jun-13 16:04:32</code>. How to solve it ? thank u</p>