X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id AE7964758E6 for ; Fri, 4 Apr 2003 17:05:07 -0500 (EST) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 74B6E474E42 for ; Fri, 4 Apr 2003 17:05:01 -0500 (EST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id E549AD643; Fri, 4 Apr 2003 14:05:02 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id DAF7C5C0A; Fri, 4 Apr 2003 14:05:02 -0800 (PST) Date: Fri, 4 Apr 2003 14:05:02 -0800 (PST) From: Stephan Szabo To: Claude Cc: Subject: Re: timestamp with postgresql 7.3 In-Reply-To: Message-ID: <20030404140146.W97589-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-25.2 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/73 X-Sequence-Number: 12774 On Fri, 4 Apr 2003, Claude wrote: > I have a table a field with timestamps in seconds since epoch and I would > like to get a human readable date... but it seems that postgresql 7.3 does > not support the datetime(), timestamp(), timestamptz() functions... I'd say probably something like: CAST('epoch' as timestamp with time zone) + integerfield * INTERVAL '1 second'