Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id BD07547594E for ; Mon, 20 May 2002 07:52:27 -0400 (EDT) Received: from thermeoneurope.com (mail.thermeoneurope.com [193.132.64.89]) by postgresql.org (Postfix) with ESMTP id 19311475943 for ; Mon, 20 May 2002 07:52:21 -0400 (EDT) Received: from gbjk1 (gbjk1.thermeoneurope.com [192.168.234.85]) by thermeoneurope.com (8.11.6/8.11.6) with SMTP id g4KBnX112333 for ; Mon, 20 May 2002 12:49:33 +0100 Reply-To: From: "Gareth Kirwan" To: Subject: Interval to number Date: Mon, 20 May 2002 12:53:01 +0100 Message-ID: <00fb01c1fff4$e5030cd0$55eaa8c0@gbjk1> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: <200205181853.19420.jm.poure@freesurf.fr> X-MailScanner: Found to be clean X-Archive-Number: 200205/151 X-Sequence-Number: 4326 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