On 11/24/2010 11:03 AM, Sibylle Koczian wrote: > Hello, > > TypeError: unsupported type for timedelta days component: unicode > > Greetings, > Sibylle >
May I suggest psycopg2.extensions.IntervalFromPy(). See: In [23]: n=datetime.datetime.now() In [24]: p=datetime.datetime.now() - datetime.timedelta(days=8,hours=4) In [25]: print psycopg2.extensions.IntervalFromPy(n-p) '8 days 14395.803036 seconds'::interval -- Adrian Klaver [email protected] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[email protected]
