I have been going around and around with storing date and time in SQLite3 with the intention of retrieving the records using comparisons later e.g. SELECT * WHERE date
changing that line with this
cur.execute('insert into new_test (curent_dt) values (?)',str(temp))
Note the added comma after "temp" below:
cur.execute('insert into new_test (curent_dt) values (?)', (temp,))
The reason this happens is that (temp)
is an integer but (temp,)
is a tuple of length one containing temp
.