durusmail: quixote-users: DateTime quoting in psycopg
Popularity of Quixote
2005-10-17
2005-10-17
Re: Popularity of Quixote
2005-10-18
2005-10-19
2005-10-19
2005-10-19
ANN: TURBOZCHERRYPLORAILS
2005-10-19
2005-10-19
2005-10-19
2005-10-22
2005-10-22
2005-10-25
2005-10-25
2005-10-25
2005-10-25
2005-10-25
2005-10-25
2005-10-25
2005-10-25
2005-10-26
2005-10-27
2005-10-27
2005-10-27
2005-10-27
2005-10-27
2005-10-27
2005-10-27
DateTime quoting in psycopg
2005-10-28
DateTime quoting in psycopg
Oleg Broytmann
2005-10-28
Hi!

On Thu, Oct 27, 2005 at 03:08:18PM +0400, Oleg Broytmann wrote:
>    psycopg1 does not quote datetime and mxDateTime instances

   Found in psycopg2 wiki - http://initd.org/tracker/psycopg/wiki/Migration :

Quoting of date and time values

   In Psycopg 1 you had to use something along the lines of

 curs.execute('...%s...', psycopg.TimestampFromMx(aTimestamp))

   where aTimestamp is a DateTime object. Psycopg 2 makes this easier for
you:

 curs.execute('...%s...', aTimestamp)

Oleg.
--
     Oleg Broytmann            http://phd.pp.ru/            phd@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.
reply