pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gareth Kirwan <gbjk@thermeoneurope.com>
To: pgsql-admin@postgresql.org
Subject: Interval to number
Date: Mon, 20 May 2002 12:53:01 +0100
Message-ID: <00fb01c1fff4$e5030cd0$55eaa8c0@gbjk1> (raw)
In-Reply-To: <200205181853.19420.jm.poure@freesurf.fr>

Postgres 7.2
I have an interval selected from a max(occurance) - min(occurance) where
bla.
I now want to multiply this by a rate - to create a charge...

If I use to_char( interval, 'SSSS');
I will get a seconds conversion - but that works on seconds since midnight -
hence
with a one day period.

Are there any better ways of converting a timestamp to an integer?


Thanks

Gareth





view thread (3+ messages)  latest in thread

Message-ID: <00fb01c1fff4$e5030cd0$55eaa8c0@gbjk1>
Permalink:  ../00fb01c1fff4$e5030cd0$55eaa8c0@gbjk1/
Also on:    postgresql.org/message-id/00fb01c1fff4$e5030cd0$55eaa8c0@gbjk1

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: gbjk@thermeoneurope.com
  Subject: Re: Interval to number
  In-Reply-To: <00fb01c1fff4$e5030cd0$55eaa8c0@gbjk1>
  References: <200205181853.19420.jm.poure@freesurf.fr> <00fb01c1fff4$e5030cd0$55eaa8c0@gbjk1>

* 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