title: A datetime equivalent in java.sql ? (is there a java.sql.datetime ?)
body: <p>So far, I have not found a clear answer to this. </p>
  
  <p>I'd like to know what the equivalent is for a SQL type DATETIME and the java type, using a PreparedStatement.</p>
  
  <p>I have found: <a href="http://www.java2s.com/Code/Java/Database-SQL-JDBC/StandardSQLDataTypeswithTheirJavaEquivalents.htm" rel="noreferrer">http://www.java2s.com/Code/Java/Database-SQL-JDBC/StandardSQLDataTypeswithTheirJavaEquivalents.htm</a></p>
  
  <p>But it states that SQL type "DATETIME" is the same as sql.date, but when looking at the SQL date docs (<a href="http://download.oracle.com/javase/7/docs/api/java/sql/Date.html" rel="noreferrer">http://download.oracle.com/javase/7/docs/api/java/sql/Date.html</a>), it says the time is truncated (all zeros).</p>
  
  <p>What I want is to be able to specify a <code>preparedStatement.setDateTime()</code> or some sort.</p>
  
  <p>The only other way I see is using a timestamp, but that would require me to change the column type, while I cannot imagine someone else never had this problem before?</p>
  
  <p>Any hints?</p>
  
  <p>Edit: I am using MYSQL.</p>