7
MySQL'e bir Python datetime.datetime nesnesi ekleme
MySQL tablosunda bir tarih sütunum var. datetime.datetime()Bu sütuna bir nesne eklemek istiyorum . Execute ifadesinde ne kullanmalıyım? Denedim: now = datetime.datetime(2009,5,5) cursor.execute("INSERT INTO table (name, id, datecolumn) VALUES (%s, %s , %s)",("name", 4,now)) Şu şekilde bir hata alıyorum: "TypeError: not all arguments converted during string formatting" Bunun yerine ne kullanmalıyım …