Interval to number

From: "Gareth Kirwan" <gbjk(at)thermeoneurope(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Interval to number
Date: 2002-05-20 11:53:01
Message-ID: 00fb01c1fff4$e5030cd0$55eaa8c0@gbjk1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general pgsql-hackers pgsql-interfaces pgsql-odbc

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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Joel Burton 2002-05-20 13:09:45 Re: Problem in User Securities
Previous Message shreedhar 2002-05-20 09:32:32 Problem in User Securities

Browse pgsql-general by date

  From Date Subject
Next Message Wm. G. Urquhart 2002-05-20 11:53:24 Referential Integrity.
Previous Message Kostyuk Oleg 2002-05-20 11:15:21 Bug or feature?

Browse pgsql-hackers by date

  From Date Subject
Next Message Lincoln Yeoh 2002-05-20 12:05:42 Re: SASL, compression?
Previous Message Michael Meskes 2002-05-20 09:08:50 Re: [COMMITTERS] pgsql/src/interfaces/ecpg ChangeLog preproc/ec ...

Browse pgsql-interfaces by date

  From Date Subject
Next Message Ed Schaller 2002-05-20 13:13:17 krb5 & multiple users
Previous Message Ted Petrosky 2002-05-20 11:13:41 libpq or ++ or xx with Project Builder help needed

Browse pgsql-odbc by date

  From Date Subject
Next Message Patrick Hatcher 2002-05-20 15:13:16 Re: int8 defined as text in MS Access?
Previous Message Vidas Makauskas 2002-05-20 09:50:27 Re: int8 defined as text in MS Access?