Re: [sqlalchemy] PostgreSQL: interval columns, values measured in months or years

2013-12-25 Thread Wichert Akkerman
On 24 Dec 2013, at 08:11, Laurence Rowe wrote: > Postgres' INTERVAL supports deltas of quantities other than days, +1 month > may mean 28/29/30/31 days depending on the month. From > http://stackoverflow.com/questions/546321/how-do-i-calculate-the-date-six-months-from-the-current-date-using-the-

Re: [sqlalchemy] PostgreSQL: interval columns, values measured in months or years

2013-12-25 Thread Wichert Akkerman
On 25 Dec 2013, at 00:27, David Bolen wrote: > Sibylle Koczian writes: > >> Exactly, that's it. The stackoverflow discussion was very instructive, >> thank you! I'll try out psycopg2-dateutils. > > I'm a big fan of dateutil. If you do use it, you may also choose to > bypass the use of timede

Re: [sqlalchemy] PostgreSQL: interval columns, values measured in months or years

2013-12-23 Thread Laurence Rowe
On Monday, 23 December 2013 06:38:41 UTC-8, Michael Bayer wrote: > > > On Dec 23, 2013, at 9:29 AM, Sibylle Koczian > > wrote: > > > Am 21.12.2013 16:27, schrieb Michael Bayer: > >> In the case of using Postgresql, the type > >> sqlalchemy.dialects.postgresql.INTERVAL takes over wherever you

Re: [sqlalchemy] PostgreSQL: interval columns, values measured in months or years

2013-12-23 Thread Michael Bayer
On Dec 23, 2013, at 9:29 AM, Sibylle Koczian wrote: > Am 21.12.2013 16:27, schrieb Michael Bayer: >> In the case of using Postgresql, the type >> sqlalchemy.dialects.postgresql.INTERVAL takes over wherever you might >> have used a sqlalchemy.Interval type.In this case, psycopg2 is >> what’s

Re: [sqlalchemy] PostgreSQL: interval columns, values measured in months or years

2013-12-21 Thread Michael Bayer
On Dec 21, 2013, at 7:05 AM, Sibylle Koczian wrote: > Hello, > > I'm using the interval data type in two PostgreSQL databases with intervals > ranging from some days to several years. No problems with intervals measured > in days, but with all the interval values which can't be correctly conv

[sqlalchemy] PostgreSQL: interval columns, values measured in months or years

2013-12-21 Thread Sibylle Koczian
Hello, I'm using the interval data type in two PostgreSQL databases with intervals ranging from some days to several years. No problems with intervals measured in days, but with all the interval values which can't be correctly converted to datetime.timedelta. All the calculations involving i