on-internet
← Community

Insert datetime entry into table with TIMESTAMP data type

Stack Overflow ·

I am trying to create a system (with a discord bot, but that's not relevant to this) where it lists infractions of a user, like when it happened, where, why, etc. and I want a "date" datatype that logs the timestamp that it happened. I tried having the DATE datatype to be "timestamp" (as well as "datetime", but the same error happens) conn1 = apsw.Connection('./dbs/warns.db') warns = conn1.cursor() warns.execute( """ CREATE TABLE IF NOT EXISTS warns (id INTEGER PRIMARY KEY AUTOINCREMENT, date timestamp, server string, user string, author string, reason string) """ ) def add_warn(guild: str, us

Comments

Sign in or sign up to comment and upvote.

No comments yet.