I have this addresses TABLE of my patients and one the column has as integer the number of days since I have last seen the patients. I need this to be updated using the current date, which is not a problem to get, and another column value from the same TABLE.
I was hoping I could do something like:
c.execute("""UPDATE addresses SET
days_since_last_appointment = :day""",
{
'day': (datetime.now()- last_appointment_day)
})
I'm using Python 3.9 and sqlite3
Any idea?