X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 47355476443 for ; Fri, 2 May 2003 18:33:58 -0400 (EDT) Received: from hotmail.com (f49.law12.hotmail.com [64.4.19.49]) by postgresql.org (Postfix) with ESMTP id 6F6DB476438 for ; Fri, 2 May 2003 18:33:54 -0400 (EDT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 2 May 2003 15:33:56 -0700 Received: from 207.34.65.240 by lw12fd.law12.hotmail.msn.com with HTTP; Fri, 02 May 2003 22:33:56 GMT X-Originating-IP: [207.34.65.240] X-Originating-Email: [daniel_katka@hotmail.com] From: "Katka a Daniel Dunajsky" To: pgsql-sql@postgresql.org Subject: Time formating Date: Fri, 02 May 2003 16:33:56 -0600 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 02 May 2003 22:33:56.0772 (UTC) FILETIME=[EB0AAE40:01C310FA] X-Spam-Status: No, hits=-1.6 required=5.0 tests=BAYES_30 version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/37 X-Sequence-Number: 13202 Hello All, This question is related to my preceeding question. How to format a value 7383 to represent 02H:03M:03SS (hours-minutes-seconds) using postgresql? I have this query: SELECT SUM (session_length))/60)/60 AS "Total", FROM user_sessions WHERE TO_CHAR(session_start, 'YYYY-MM') = '2003-04'; If session_length = 7383 I will receive 2. I have received advice that I should use . and it will work with select 5./2, however how to do it when I have a variable? Thank you for your time. Daniel _________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail