Skip site navigation (1) Skip section navigation (2)

Re: Time Help

From: Mark Volpe <volpe(dot)mark(at)epamail(dot)epa(dot)gov>
To: "Brian C(dot) Doyle" <bcdoyle(at)mindspring(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Time Help
Date: 2000-08-22 13:55:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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;


"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

In response to

  • Time Help at 2000-08-22 10:47:19 from Brian C. Doyle


pgsql-sql by date

Next:From: Tom LaneDate: 2000-08-22 14:16:54
Subject: Re: using INTERSECT and UNION in IN clause
Previous:From: Keith WongDate: 2000-08-22 11:16:23
Subject: tip: weird parse error for pl/pgsql

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group