Re: Time Help - Mailing list pgsql-sql

From Mark Volpe
Subject Re: Time Help
Date
Msg-id 39A28640.DF45460B@epamail.epa.gov
Whole thread Raw
In response to Time Help  ("Brian C. Doyle" <bcdoyle@mindspring.com>)
List pgsql-sql
I'm not sure at all what you are asking, but I'm thinking you're trying to
convert a "timespan" to a "time". Try adding it to a time like this:
SELECT '0:00:00'::time + '02:10:06'::timespan;

Mark

"Brian C. Doyle" wrote:
> 
> Hello all,
> 
> I have a query result of @ 2 hours 10 mins 6 secs and I would like to
> change that to 02:10:06.  Currently the field is listed as "timespan"  This
> allows me to input date as 02:10:06 or 4h 10m 6s or even 2hrs 10 min 6 sec
> which are all the formats that I will be entering the time formats! How do
> I convert it into a the format of 02:10:06
> 
> Thanks to you all


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: using INTERSECT and UNION in IN clause
Next
From: Mark Volpe
Date:
Subject: Re: Time Help