title: How to store datetime with millisecond precision in SQL database
body: <p>With a float value representing date and time with millisecond precision:</p>
  
  <pre><code>import datetime
  float_time = 1485538757.29289
  print datetime.datetime.fromtimestamp(float_time) 
  </code></pre>
  
  <p>prints:</p>
  
  <pre><code>2017-01-27 09:39:17.292890
  </code></pre>
  
  <p>To store it in db:</p>
  
  <pre><code>from sqlalchemy import Column, DateTime
  from sqlalchemy.ext.declarative import declarative_base
  
  Base = declarative_base()
  
  class MyTable(Base):
      __tablename__ = 'mytable'
      time_created = Column(DateTime, nullable=False)
  </code></pre>
  
  <p>But saved value is rounded down to <code>2017-01-27 09:39:17</code> (from <code>2017-01-27 09:39:17.292890</code>). Is there is a solution?</p>