title: pyQT5 problems inserting dates in Sqlite table
body: <p>I'm doing some test to understand how sqlite manage dates and times.
  I created a very simple program to insert the current date and time into a table with 2 fields defined as 'Numeric' and 'Integer'. The issue I'm having is the record is inserted with the two fields empty and I don't understand why.
  I  put below the code including the class to manage Sqlite connection. Thanks for any help</p>
  <pre><code>import sys
  from PyQt5.QtSql import QSqlDatabase, QSqlQuery
  from connect_SQLITE import Database
  from datetime import datetime
  
  currentDateTime = datetime.now()
  
  db=Database()
  
  InsertQuery = QSqlQuery()
  InsertQuery.prepare(&quot;INSERT INTO Prova (dataPreventivo, dataPreventivo1) &quot;
                  &quot;VALUES (?, ?)&quot;)
  InsertQuery.bindValue(&quot;:dataPreventivo1&quot;, currentDateTime)
  InsertQuery.bindValue(&quot;:dataPreventivo1&quot;, currentDateTime)
  InsertQuery.exec()
  db.commit_db()
  </code></pre>
  <p>connect_SQLITE.py</p>
  <pre><code>import sys
  import sqlite3
  from PyQt5.QtSql import QSqlDatabase, QSqlQuery
  from PyQt5.QtWidgets import QApplication, QMessageBox, QLabel
  
  class Database(object):
  
     con=QSqlDatabase.addDatabase('QSQLITE')
     con.setConnectOptions(&quot;detect_types=sqlite3.PARSE_DECLTYPES |                                                               sqlite3.PARSE_COLNAMES&quot;)
     con.setDatabaseName(&quot;/Users/MyUser/Documents/Micro/db/Micro.db&quot;)
  
     query=QSqlQuery()
  
     def __init__(self):
  
   # Try to open the connection and handle possible errors
  
        if not self.con.open():
           QMessageBox.critical(None,&quot;App Name - Error!&quot;,&quot;Database Error: %s&quot; %          self.con.lastError().databaseText(),)
           sys.exit(1)  
    
  
     def commit_db(self):
        self.con.commit()
  
     def close_db(self):
        self.con.close()
  
     def read_db(self, sqlstr, values, campi):
       self.query.prepare(sqlstr)
       for i in range(campi):
         self.query.addBindValue(values[i])
       self.query.exec() 
       return self.query
  
     def insert_db(self, sqlstr, values, campi):
       self.query.prepare(sqlstr)
       for i in range(campi):
         self.query.addBindValue(values[i])    
       Database.commit_db(self)
       return self.query
  </code></pre>