мой код:
cursor.execute('INSERT INTO url(email, product, date) VALUES("email@email.com","0", "2020-04-05")',)
sqlite_select_query = "SELECT date FROM 'url' "
cursor.execute(sqlite_select_query)
records = cursor.fetchall()
print(records[0])
date_format = "%m/%d/%Y"
a = records
b = datetime.date.today()
delta = b - a
print(delta.days)
connection.commit()
Возвращаемая ошибка:
delta = b - a
TypeError: unsupported operand type(s) for -: 'datetime.date' and 'tuple'
Что мне сделать, чтобы решить эту проблему?