Re: is in postgres solution

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Margus Roo <margusja(at)101d(dot)ee>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: is in postgres solution
Date: 2005-05-16 19:49:26
Message-ID: 20050516194926.GA31098@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, May 16, 2005 at 11:43:09 +0300,
Margus Roo <margusja(at)101d(dot)ee> wrote:
> Hello.
> I have 2 variables type timestamp. Example date1 = 2005-01-01 23:00 and
> date2 = 2005-05-04 12:00. I want get something like age(date2,date1) but
> ouput format must by hours::minutes.
>
> Is that bossible?

extract the epoch from the difference in timestamps and that will give
you a time in seconds that you can format as desired with a little
math.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adam Witney 2005-05-16 20:05:44 Re: Distinguishing between connections in pg_hba.conf
Previous Message Scott Marlowe 2005-05-16 19:17:05 Re: Distinguishing between connections in pg_hba.conf