X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A3DCFDAC4A for ; Wed, 26 Oct 2005 06:25:24 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13672-04 for ; Wed, 26 Oct 2005 09:25:19 +0000 (GMT) Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by svr1.postgresql.org (Postfix) with ESMTP id D8F3DDAB42 for ; Wed, 26 Oct 2005 06:25:20 -0300 (ADT) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 221AF424954; Wed, 26 Oct 2005 10:25:17 +0100 (BST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id EE80C15EDA; Wed, 26 Oct 2005 10:22:31 +0100 (BST) Received: from mainbox.archonet.com ([127.0.0.1]) by localhost (mainbox [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 04793-07; Wed, 26 Oct 2005 10:22:26 +0100 (BST) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id E086115ED5; Wed, 26 Oct 2005 10:22:25 +0100 (BST) Message-ID: <435F4AD1.3070605@archonet.com> Date: Wed, 26 Oct 2005 10:22:25 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Rajesh Kumar Mallah Cc: pgsql-sql@postgresql.org Subject: Re: converting epoch to timestamp References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.059 required=5 tests=[AWL=0.009, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/316 X-Sequence-Number: 23169 Rajesh Kumar Mallah wrote: > Hi, > > Can anyone tell me how to convert epoch to timestamp ? > > ie reverse of : > > SELECT EXTRACT( epoch FROM now() ); I'd start with either Google or the manuals. http://www.postgresql.org/docs/8.0/interactive/functions-datetime.html Scroll down to the section on "epoch" here and see the example. -- Richard Huxton Archonet Ltd