title: How to store Java Date to Mysql datetime with JPA
body: <p>Can any body tell me how can I store Java Date to Mysql datetime...?</p>
  <p>When I am trying to do so...only date is stored and time remain 00:00:00
  in Mysql date stores like this...</p>
  <pre><code>2009-09-22 00:00:00
  </code></pre>
  <p>I want not only date but also time...like</p>
  <pre><code>2009-09-22 08:08:11
  </code></pre>
  <p>I am using JPA(Hibernate) with spring mydomain classes uses java.util.Date but i have created tables using handwritten queries...</p>
  <p>this is my create statement</p>
  <pre><code>CREATE TABLE ContactUs (
    id BIGINT AUTO_INCREMENT, 
    userName VARCHAR(30), 
    email VARCHAR(50),
    subject VARCHAR(100), 
    message VARCHAR(1024), 
    messageType VARCHAR(15), 
    contactUsTime DATETIME,
    PRIMARY KEY(id)
  );
  </code></pre>