title: pymysql and sqlalchemy: AttributeError: 'DateTime' object has no attribute 'translate'
body: <p>Upon trying to save a new record to the DB, I receive the above error, related to a DateTime attribute I have (engagementDate).</p>
  
  <p>The type of the value I'm passing to sqlalchemy looks OK:</p>
  
  <pre><code>&lt;wx.DateTime: "Sat Apr 28 00:00:00 2018"&gt;
  </code></pre>
  
  <p>On MySql, my schema has these settings:</p>
  
  <p><em>Default Collation: utf8_general_ci</em></p>
  
  <p><em>Default Character set: utf8</em></p>
  
  <p>The date value is taken from a wx.adv.DatePickerCtrl on a wx.Dialog (form), properly presented and validated in my local utf8.</p>
  
  <p>My connection string to MySQL has this local defined: utf8mb4.</p>
  
  <p>The table is created with this model:</p>
  
  <pre><code>class Contractors(DeclarativeBase):
      __tablename__ = "contractors"
  
      id = Column(Integer, primary_key=True)
      company_name = Column("company_name", Unicode(80))
      company_address = Column("company_address", String(250))
      ...
      is_training_provider = Column("is_training_provider", Boolean())
      engagement_date = Column("engagement_date", DateTime)
      comments = Column("comments", Text())
  </code></pre>
  
  <p>My olv model:</p>
  
  <pre><code>class OlvContractors(object):
  
      def __init__(self, id, company_name, company_address, company_city, company_zip, company_country, company_phone1,
                   company_phone2, company_description, contact_person, cp_email, cp_phone1, cp_phone2,
                   is_training_provider, engagement_date, comments):
          self.id = id  # unique row id from database
          self.company_name = company_name
          self.company_address = company_address
          ...
          self.is_training_provider = is_training_provider
          self.engagement_date = engagement_date
          self.comments = comments
  </code></pre>
  
  <p>The SQL Statement generated by sqlalchemy is:</p>
  
  <pre><code>INSERT
  INTO
  contractors(company_name, company_address, company_city, company_zip, company_country, company_phone1, company_phone2,
              company_description, contact_person, cp_email, cp_phone1, cp_phone2, is_training_provider, engagement_date,
              comments)
  VALUES( % (company_name)
  s, % (company_address)
  s, % (company_city)
  s, % (company_zip)
  s, % (company_country)
  s, % (company_phone1)
  s, % (company_phone2)
  s, % (company_description)
  s, % (contact_person)
  s, % (cp_email)
  s, % (cp_phone1)
  s, % (cp_phone2)
  s, % (is_training_provider)
  s, % (engagement_date)
  s, % (comments)
  s)
  {'company_name': '', 'company_address': '', 'company_city': '', 'company_zip': '', 'company_country': '',
   'company_phone1': '', 'company_phone2': '', 'company_description': '', 'contact_person': '', 'cp_email': '',
   'cp_phone1': '', 'cp_phone2': '', 'is_training_provider': 0, 'engagement_date'
   : &lt; wx.DateTime: "Sat Apr 28 00:00:00 2018" &gt;, 'comments': ''}
  </code></pre>
  
  <p>You can see that the engagement date is showing the TYPE, and not the value. Do I need to explicitly convert this? How?</p>
  
  <p>I'm passing the values to be inserted into the DB as a dictionary:</p>
  
  <pre><code>{'company_name': '', 'company_address': '', 'company_city': '', 'company_zip': '', 'company_country': '', 'company_phone1': '', 'company_phone2': '', 'company_description': '', 'contact_person': '', 'cp_email': '', 'cp_phone1': '', 'cp_phone2': '', 'is_training_provider': False, 'engagement_date': &lt;wx.DateTime: "Sat Apr 28 00:00:00 2018"&gt;, 'comments': ''}
  </code></pre>
  
  <p>...using this function:</p>
  
  <pre><code>def insertRecord(targetObject, dict_values):
      print("dict values received {}".format(dict_values))
      session = connectToDatabase()
      session.execute(targetObject.__table__.insert(), dict_values)
      session.commit()
      session.close()
  </code></pre>
  
  <p>Thanks for any guidance!</p>