Comments on earlier age() post. - Mailing list pgsql-general

From Mitch Vincent
Subject Comments on earlier age() post.
Date
Msg-id 00b501c033a5$9e0f7f10$0200000a@doot
Whole thread Raw
Responses Re: Comments on earlier age() post.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I haven't heard from anyone on my earlier age() post. If someone could test
it on their database and let me know if the behavior they get is expected, I
would greatly appreciate it.

The queries again :

hhs=# SELECT age('Sun Dec 03 08:00:00 2000 EST','Tue Oct 10 08:00:00 2000
EDT') as esec;
          esec
------------------------
 @ 1 mon 24 days 1 hour
(1 row)

Ok, but if I turn right around and add that value back , I get :

hhs=# SELECT ('Tue Oct 10 08:00:00 2000 EDT'::timestamp + '1 mon 24 days 1
hour'::interval);
           ?column?
------------------------------
 Mon Dec 04 08:00:00 2000 EST
(1 row)

Thanks!!!

-Mitch

"I'd change the world if God would just give me the source code."


pgsql-general by date:

Previous
From: Marc SCHAEFER
Date:
Subject: Re: R: PostgreSQL book
Next
From: shm@daimlerchrysler.com
Date:
Subject: Postgres Global Variables