Sorry, this may be really easy but I am new at learning code, I am trying to return all
yesterday = ((dt.date.today()-dt.timedelta(days=1)))
cur.execute("SELECT * FROM iron_condor WHERE open='yes' AND DATE(buy_date)<DATE(?)"(yesterday))
I am getting this back
Traceback (most recent call last):
File "/home/pi/Documents/openoptions.py", line 86, in <module>
cur.execute("SELECT * FROM iron_condor WHERE open='yes' AND DATE(buy_date)<DATE(?)"(yesterday))
TypeError: 'str' object is not callable
note the 2 commas. You may need to convert
yesterdaytostr.