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 2B29BD8B65 for ; Mon, 12 Sep 2005 15:01:18 -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 08334-02 for ; Mon, 12 Sep 2005 18:01:15 +0000 (GMT) Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by svr1.postgresql.org (Postfix) with ESMTP id 4A482D8B61 for ; Mon, 12 Sep 2005 15:01:15 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 1068A31F81; Mon, 12 Sep 2005 20:01:15 +0200 (MET DST) From: "Wei" X-Newsgroups: pgsql.sql Subject: How do I convert an integet to a timestamp? Date: 12 Sep 2005 11:01:08 -0700 Organization: http://groups.google.com Lines: 12 Message-ID: <1126548068.702382.67260@z14g2000cwz.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Complaints-To: groups-abuse@google.com User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: z14g2000cwz.googlegroups.com; posting-host=69.120.101.108; posting-account=pxcBTA0AAABE_hvkOkK7kxtrrZZuhuJZ To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200509/135 X-Sequence-Number: 22682 Hi. I followed the doc and tried "select CAST(1126547334 AS timestamp)" and I only got an error response that says: ERROR: cannot cast type integer to timestamp without time zone. What is the proper way to do the conversion? Thanks Wei