I want to select all data of several particular dates using following codes.
test_date = ('2012-08-04', '2013-08-19')
conn=sqlite3.connect(sqlite_file)
c=conn.cursor()
dat=c.execute("SELECT dat FROM dat_tbl WHERE date IN ? ", test_date)
dat_tuple=dat.fetchall()
conn.close()
It failed with error message
OperationalError: near "?": syntax error
I am wondering what is wrong here and how to fix it. Thanks.