Hey guys, I hope I used the Mailing List properly. I am trying to upload a datetime.timedelta object into a column of type interval... But when I query it says datetime.interval(0).
here are the lines where the error probably is:-
print(cur.mogrify("""SELECT %s, %s, %s, %s""", (self.start_time.date(), self.start_time.time(), datetime.datetime.now() - self.start_time, desc_text)))
cur.execute("""INSERT INTO sessionlogs(sessiondate, sessiontime, sessionduration, sessiondesc)
VALUES(%s, %s, %s, %s);""", (self.start_time.date(), self.start_time.time(), datetime.datetime.now() - self.start_time, desc_text))
although when I wrote another script to enter a specific code, it was working just fine.