Re: How do I convert an interval into integer?

From: Tomasz Myrta <jasiek(at)klaster(dot)net>
To: Wei Weng <wweng(at)kencast(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: How do I convert an interval into integer?
Date: 2003-12-04 18:26:08
Message-ID: 3FCF7C40.2040505@klaster.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Dnia 2003-12-04 19:09, Użytkownik Wei Weng napisał:

> I want to convert an interval (from substraction between two timestamps) into
> a integer that represents how many seconds that interval has. How do I do
> that?

select extract(epoch from your_interval);

Regards,
Tomasz Myrta

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tomasz Myrta 2003-12-04 18:36:58 Re: Trigger plpgsql function, how to test if OLD is set?
Previous Message Jeff Kowalczyk 2003-12-04 18:18:02 Trigger plpgsql function, how to test if OLD is set?