pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomasz Myrta <jasiek@klaster.net>
To: Wei Weng <wweng@kencast.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: How do I convert an interval into integer?
Date: Thu, 04 Dec 2003 19:26:08 +0100
Message-ID: <3FCF7C40.2040505@klaster.net> (raw)
In-Reply-To: <200312041309.12704.wweng@kencast.com>
References: <200312041309.12704.wweng@kencast.com>

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




view thread (2+ messages)

Message-ID: <3FCF7C40.2040505@klaster.net>
Permalink:  ../3FCF7C40.2040505@klaster.net/
Also on:    postgresql.org/message-id/3FCF7C40.2040505@klaster.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jasiek@klaster.net, wweng@kencast.com
  Subject: Re: How do I convert an interval into integer?
  In-Reply-To: <3FCF7C40.2040505@klaster.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox