title: How to insert time 2009-09-22 18:09:37.881 in MYSQL My column type is DateTime
body: <p>How to insert time <code>2009-09-22 18:09:37.881</code> in mysql. Actually I can insert and retrieve the time <code>2009-09-22 18:09:37</code> in mysql but whenever I am trying to insert <code>2009-09-22 18:09:37.881</code> data did not get inserted in database.</p>
  
  <pre><code>2009-09-22 18:09:37.881     -------&gt;  YYYY-MM-DD HH:MI:Sec.Ms
  </code></pre>
  
  <p>I have created a table using the below query</p>
  
  <pre><code>Create table XYZ(MyTime DateTime);
  </code></pre>
  
  <p>I tried the below query which worked fine</p>
  
  <pre><code>insert into XYZ(MyTime) values('2009-09-22 18:09:37');
  </code></pre>
  
  <p>But I tried with the below query which did not work fine (Data didnot get insert in database)</p>
  
  <pre><code> insert into XYZ(MyTime) values('2009-09-22 18:11:38.881');
  </code></pre>