Re: [Quixote-users] DateTime quoting in psycopg
Oleg Broytmann <[email protected]>
| Newsgroups | gmane.comp.python.sqlobject,gmane.comp.web.quixote.user |
|---|---|
| Message-ID | <[email protected]> |
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/ [email protected]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information