From: Ed Loehr <eloehr@austin.rr.com>
To: Jeff MacDonald <jeff@pgsql.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: timespan casting
Date: Thu, 22 Jun 2000 20:55:32 -0500
Message-ID: <3952C394.67050AC5@austin.rr.com> (raw)
References: <Pine.BSF.4.21.0006222030390.280-100000@rage.hub.org>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: eloehr@austin.rr.com, jeff@pgsql.com
Subject: Re: timespan casting
In-Reply-To: <3952C394.67050AC5@austin.rr.com>
References: <Pine.BSF.4.21.0006222030390.280-100000@rage.hub.org> <3952C394.67050AC5@austin.rr.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox