X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 43CEA475B47 for ; Fri, 4 Apr 2003 19:21:38 -0500 (EST) Received: from bar.noc.be.easynet.net (bar.noc.be.easynet.net [212.100.163.72]) by postgresql.org (Postfix) with ESMTP id A877C475A45 for ; Fri, 4 Apr 2003 19:21:37 -0500 (EST) Received: from claude (helo=localhost) by bar.noc.be.easynet.net with local-esmtp (Exim 3.36 #1 (Debian)) id 191bRA-000734-00; Sat, 05 Apr 2003 02:21:36 +0200 Date: Sat, 5 Apr 2003 02:21:36 +0200 (CEST) From: Claude X-X-Sender: claude@bar.noc.be.easynet.net To: Stephan Szabo Cc: pgsql-sql@postgresql.org Subject: Re: timestamp with postgresql 7.3 In-Reply-To: <20030404140146.W97589-100000@megazone23.bigpanda.com> Message-ID: References: <20030404140146.W97589-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-38.8 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, QUOTE_TWICE_1,REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_PINE 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/74 X-Sequence-Number: 12775 Thanks, that made the trick. On Fri, 4 Apr 2003, Stephan Szabo wrote: > > 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'