Re: How cast interval to minutes as number?

From: Andreas <maps(dot)on(at)gmx(dot)net>
To: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: How cast interval to minutes as number?
Date: 2007-11-25 09:10:08
Message-ID: 47493BF0.6070006@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Andreas Kretschmer schrieb:
> Andreas <maps(dot)on(at)gmx(dot)net> schrieb:
>
>> This results in a column of type interval.
>> How would I get this interval converted into e.g. minutes.
>>
>
> Okay, lets assume i want to know how old is my daughter, in minutes:
> test=# select EXTRACT (EPOCH FROM now() - '2007-07-28 09:15:00'::timestamp )::int/60;
>
Thanks and congratulations ;-)

Andreas

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Dean Rasheed 2007-11-25 10:09:57 Re: A question of volatility
Previous Message Andreas 2007-11-25 09:03:19 Re: How cast interval to minutes as number?