pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomasz Myrta <jasiek@klaster.net>
To: brett@cloud9.net
Cc: pgsql-sql@postgresql.org
Subject: Re: interval conversion
Date: Thu, 28 Aug 2003 16:40:09 +0200
Message-ID: <3F4E1449.5040807@klaster.net> (raw)
In-Reply-To: <61031.63.142.161.101.1062077015.squirrel@frank.mercea.net>
References: <61031.63.142.161.101.1062077015.squirrel@frank.mercea.net>

> Hello all!
> 
> I have a possibly stupid question- I'm doing some time calculations yielding
> intervals, and for my purposes I need to convert the interval(say, "1 day 8
> hours") into (floating point) hours.  While there's a plethora of handy
> date_extract functionality and the like, I need a conversion.
> 
> Any suggestions on how to accompish this?  Simpler the better, of course.

extract(epoch from some_interval)/3600

Regards,
Tomasz Myrta




view thread (3+ messages)  latest in thread

Message-ID: <3F4E1449.5040807@klaster.net>
Permalink:  ../3F4E1449.5040807@klaster.net/
Also on:    postgresql.org/message-id/3F4E1449.5040807@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, brett@cloud9.net
  Subject: Re: interval conversion
  In-Reply-To: <3F4E1449.5040807@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