X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 56166D1B323 for ; Tue, 11 May 2004 05:17:53 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 28757-10 for ; Tue, 11 May 2004 05:17:34 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 8008BD1B337 for ; Tue, 11 May 2004 05:17:32 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id i4B8HVSx093300 for ; Tue, 11 May 2004 08:17:31 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id i4B88YxQ074848 for pgsql-sql@postgresql.org; Tue, 11 May 2004 08:08:34 GMT From: Willem de Jong X-Newsgroups: comp.databases.postgresql.sql Subject: Seconds To Time Date: Tue, 11 May 2004 08:08:34 +0000 (UTC) Organization: DNA Services B.V. Lines: 16 Message-ID: X-Complaints-To: usenet@news.hub.org User-Agent: Xnews/5.04.25 To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/98 X-Sequence-Number: 17812 Hi all, I'm a newby to PGSQL, I allways use MySQL, but now we use PGSQL, so i had to convert all the MySQL-Query's to PGSQL. In MySQL we have the function Sec_to_time(seconds). This will result a time-value like '40:30:00'. With this Query SELECT TIMESTAMP WITH TIME ZONE 'epoch' + sum(elapsed)/1000 * interval '1 second' from Table1 GROUP BY ... The result is a timestamp from the unixtime + the seconds elapsed. How can I convert this to a time-value? Thanks in advance