i have a table which holds some columns, ID(IntPK), Name(Text), Quantity(Int), Total(Int), Hour(Int),Date(Int)
I want to only have to insert a Name, a Quantity, and a Total, and then whenever a field is inserted into this table, i want it to automatically fill the hour and date with say, the hour and date from the computer.. Is there a way? I don't want to have to be typing the date and hour in everytime i insert a new field..
import sqlite3
conn = sqlite3.connect('Inventario.db')
c = conn.cursor()
conn.commit()
c.execute('''CREATE table if not exists sales(id INTEGER PRIMARY KEY, client TEXT, qty INTEGER, total INTEGER, hour INTEGER, date INTEGER)''')