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

Re: Regarding interval conversion functions and a seeming lack of usefulness

From: Bill Moran <wmoran(at)collaborativefusion(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Regarding interval conversion functions and a seeming lack of usefulness
Date: 2008-02-27 16:32:16
Message-ID: 20080227113216.ecdff652.wmoran@collaborativefusion.com (view raw or flat)
Thread:
Lists: pgsql-general
In response to Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:

> Bill Moran <wmoran(at)collaborativefusion(dot)com> writes:
> > There seems to be a lack of useful functions for converting intervals
> > to useful representations.  For example, I want to display an interval
> > in hours and fractions of hours only, not hours and minutes.
> 
> Perhaps EXTRACT(EPOCH ...) to get total seconds and then do some
> arithmetic?

Well, that's more or less what I've been doing (although the EPOCH
thing shortened the code up a bit, thanks!).

It just seemed like this would be something so common that there'd
be something in existence already.  I guess I was wrong.

-- 
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/

wmoran(at)collaborativefusion(dot)com
Phone: 412-422-3463x4023

In response to

Responses

pgsql-general by date

Next:From: akshay bhatDate: 2008-02-27 16:33:40
Subject: help for loading a psql file
Previous:From: LewDate: 2008-02-27 16:28:32
Subject: Re: reindexing

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