Re: Using and manipulating dates

Karsten Hilbert <[email protected]> Wed, 26 May 2004 14:02:59 +0200
Newsgroups gmane.comp.python.db.pypgsql.user
Message-ID <[email protected]>
Godoy,

dates are returned as mx.DateTime.DateTime instances. That
package (eGenix mx) provides for quite nice data manipulation.
You can look up their docs at their website.

One never changes the format a date is *stored* in the
database, only the way it is *presented to* the database for
storage. I usually send ISO dates to the database and convert
to any format I desire from the mx DateTime instances I get
back.

Note that *interval* support is broken in pyPgSQL if you use
age() in your selects. I posted a patch a few weeks back but
there seemed to be no interest.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click