From: | Ed Loehr <eloehr(at)austin(dot)rr(dot)com> |
---|---|
To: | Jeff MacDonald <jeff(at)pgsql(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: timespan casting |
Date: | 2000-06-23 01:55:32 |
Message-ID: | 3952C394.67050AC5@austin.rr.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Jeff MacDonald wrote:
> bignose=> select start,stop, stop-start as start_stop from foo;
> start | stop | start_stop
> ------------------------+------------------------+------------
> 2000-06-22 20:37:12-03 | 2000-06-22 20:37:12-03 | 00:000
>
> now my question.. first of all is the first start_stop result a little
> off ? (talking about the 3 0's..)
What's off about it?? Your start and stop appear identical.
> second is there a way i can do a select so it says something more human
> usable ie : 100 days 22 hours 32 minutes..
Try to_char(). http://www.postgresql.org/docs/postgres/x2976.htm
Regards,
Ed Loehr
From | Date | Subject | |
---|---|---|---|
Next Message | D'Arcy J.M. Cain | 2000-06-23 02:43:38 | Re: Using substr with user defined types |
Previous Message | Ryan Kirkpatrick | 2000-06-23 00:36:34 | Re: Sequences do not obey transactions... |