python Datetime and SQLite
<p>I'd like to enter the current time into my sql table using sqlite3 and python. This code results in an error.</p>

<pre><code>cur.execute('''
CREATE TABLE IF NOT EXISTS Finance (date DATE, time TEXT, cost FLOAT, item TEXT, cat TEXT)''')

time = datetime.datetime.now().time()

cur.execute('''INSERT INTO Finance (date, time, cost, item, cat) VALUES ( ?, ?, ?, ?, ? )''', ( date, time, cost, item, cat ) )
</code></pre>

<p>This is the error:</p>

<pre><code>ur.execute('''INSERT INTO Finance (date, time, cost, item, cat) VALUES ( ?, ?, ?, ?, ? )''', ( date, time, cost, item, cat ) )
sqlite3.InterfaceError: Error binding parameter 1 - probably unsupported type.
</code></pre>

<p>However if I use this format for time,</p>

<pre><code>time = datetime.datetime.now.ctime()
</code></pre>

<p>I can input the data with "Wed Mar  9 15:18:37 2016" format. </p>

<p>I just want the time, not the date and time. What datatype should I use?
Thanks</p>