From: | "Patrick Fiche" <patrick(dot)fiche(at)aqsacom(dot)com> |
---|---|
To: | "'Jeff MacDonald'" <jeff(at)interchange(dot)ca> |
Cc: | "'Postgres List'" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: |
Date: | 2002-10-09 15:09:34 |
Message-ID: | 85058ADF852DD5118FD50002A528A5B6079A7C@SERVEUR |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
You could try
SELECT age( '1995-01-01', CAST( birthdate AS varchar ) )FROM users
Patrick
-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)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(at)interchange(dot)ca
---
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
From | Date | Subject | |
---|---|---|---|
Next Message | Ed L. | 2002-10-09 15:24:07 | Backup alternatives |
Previous Message | Jeff MacDonald | 2002-10-09 15:06:42 | Unable to convert date to tm |