psycopg2 / psycopg2.DataError: invalid input syntax for type timestamp with time zone:
steve at holdenweb.com
Wed Mar 31 01:44:53 CEST 2010
D'Arcy J.M. Cain wrote:
> 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.
And in future please tell us exactly what error you are trying to
explain by quoting the traceback exactly.
Steve Holden +1 571 484 6266 +1 800 494 3119
See PyCon Talks from Atlanta 2010 http://pycon.blip.tv/
Holden Web LLC http://www.holdenweb.com/
UPCOMING EVENTS: http://holdenweb.eventbrite.com/
More information about the Python-list