psycopg2 / psycopg2.DataError: invalid input syntax for type timestamp with time zone:

D'Arcy J.M. Cain darcy at druid.net
Tue Mar 30 23:50:56 CEST 2010


On Tue, 30 Mar 2010 13:47:42 -0700 (PDT)
ASh <anton.shishkov at gmail.com> wrote:
> Hi, please help me understand why am I getting error with this query
> 
> 
>             new_start_date = "NOW() - '29 days'::INTERVAL"
>             self.dyndb.orderdb.query('''update xxxx set creation_date
> = %s
>             where id_order = %s''', (new_start_date, "123"))

Put single quotes around the first %s in the query.

-- 
D'Arcy J.M. Cain <darcy at druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.



More information about the Python-list mailing list