I'm trying to insert NOW() as one of the values using cursor.execute() in python. Problem is, the value is treated as string, and I get an error.
What I'm doing:
cursor.execute(cursor,"UPDATE t SET d=%s",'NOW()')
The query I want:
UPDATE t SET d=NOW()
The query I get:
UPDATE t SET d="NOW()"
Is there any way to fix this, so that NOW() is inserted in the query exactly as intended? I'd rather not use workarounds like datatime.now() due to time zone issues.
Thank you!