Re:
От | Jeff MacDonald |
---|---|
Тема | Re: |
Дата | |
Msg-id | HIEGJGDMNIKAMPPDEKBNOEICCCAA.jeff@interchange.ca обсуждение исходный текст |
Ответ на | Re: ("Patrick Fiche" <patrick.fiche@aqsacom.com>) |
Список | pgsql-general |
actuall this worked xx=> SELECT age('1995-01-01',birthdate::datetime) FROM users where id =343; so i'm all fixed up now. > -----Original Message----- > From: Patrick Fiche [mailto:patrick.fiche@aqsacom.com] > Sent: Wednesday, October 09, 2002 11:10 AM > To: 'Jeff MacDonald' > Cc: 'Postgres List' > Subject: RE: [GENERAL] > > > You could try > SELECT age( '1995-01-01', CAST( birthdate AS varchar ) )FROM users > > Patrick > > -----Original Message----- > From: pgsql-general-owner@postgresql.org > [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Jeff MacDonald > Sent: Wednesday, October 09, 2002 4:42 PM > To: Postgres List > Subject: [GENERAL] > > > Hi Folks, > > This problem is occuring on pgsql 7.2.1 as well as 7.2.2. > I have nothing to say except this is VERY weird. Is there something > evil about 1930-04-27 ? > > xxx=>SELECT id,birthdate FROM users WHERE id IN (343,345); > id | birthdate > -----+------------ > 343 | 1930-04-27 > 345 | 1963-09-15 > (2 rows) > > xxx=> SELECT age('1995-01-01',birthdate) FROM users where id =343; > ERROR: Unable to convert date to tm > xxx=> SELECT age('1995-01-01',birthdate) FROM users where id =345; > age > ------------------------------- > 31 years 3 mons 16 days 01:00 > (1 row) > > > > --- > Jeff MacDonald > Interchange Technologies > jeff@interchange.ca > --- > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster >
В списке pgsql-general по дате отправления: