Re: Convert interval to hours

2018-09-14 Thread Peter Kleiner
On Fri, Sep 14, 2018 at 2:42 PM Steven Lembark wrote: > > On Fri, 14 Sep 2018 12:21:14 -0400 > David Gauthier wrote: > > > I'm using postgres v9.5.2 on RH6. > > PG can convert the times for you. > For times (not timestamps) you are always better off dealing with > either time or integer seconds.

Re: Convert interval to hours

2018-09-14 Thread Steven Lembark
On Fri, 14 Sep 2018 12:21:14 -0400 David Gauthier wrote: > I'm using postgres v9.5.2 on RH6. PG can convert the times for you. For times (not timestamps) you are always better off dealing with either time or integer seconds. There are a variety of issues with rouding that affect repeatability an

Re: Convert interval to hours

2018-09-14 Thread Ron
On 09/14/2018 11:10 AM, Steven Lembark wrote: On Fri, 14 Sep 2018 11:55:18 -0400 Peter Kleiner wrote: On Fri, Sep 14, 2018 at 11:51 AM David Gauthier wrote: Hi: In perl/DBI, I have code that's getting me an "age" which returns something like... "-17 days -08:29:35". How can I convert that t

Re: Convert interval to hours

2018-09-14 Thread Steven Lembark
On Fri, 14 Sep 2018 11:55:18 -0400 Peter Kleiner wrote: > On Fri, Sep 14, 2018 at 11:51 AM David Gauthier > wrote: > > > > Hi: > > > > In perl/DBI, I have code that's getting me an "age" which returns > > something like... "-17 days -08:29:35". How can I convert that to > > a number of hours (a

Re: Convert interval to hours

2018-09-14 Thread Peter Kleiner
On Fri, Sep 14, 2018 at 11:51 AM David Gauthier wrote: > > Hi: > > In perl/DBI, I have code that's getting me an "age" which returns something > like... "-17 days -08:29:35". How can I convert that to a number of hours > (as a float I would presume) ? > > Thanks > > > > I've done this as selec

Convert interval to hours

2018-09-14 Thread David Gauthier
Hi: In perl/DBI, I have code that's getting me an "age" which returns something like... "-17 days -08:29:35". How can I convert that to a number of hours (as a float I would presume) ? Thanks