import sqlite3
import datetime
with sqlite3.connect('test_db', detect_types = sqlite3.PARSE_DECLTYPES | sqlite3.PARSE_COLNAMES) as con:
cur = con.cursor()
try:
data = cur.execute('SELECT * FROM vip_users').fetchall()
print(data)
except sqlite3.OperationalError:
print('ERROR')
File "/home/lastwek/Рабочий стол/bot/test.py", line 7, in
data = cur.execute('SELECT * FROM vip_users').fetchall()
File "/usr/lib/python3.8/sqlite3/dbapi2.py", line 64, in convert_date
return datetime.date(*map(int, val.split(b"-")))
ValueError: invalid literal for int() with base 10: b'23 13:28:32.725766'
select time_to_next_pay as "time_to_next_pay [timestamp]" from vip_users