X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C416047635A for ; Mon, 12 May 2003 11:24:13 -0400 (EDT) Received: from matrix.gatewaynet.com (unknown [217.19.69.50]) by postgresql.org (Postfix) with ESMTP id 4603C476333 for ; Mon, 12 May 2003 11:23:51 -0400 (EDT) Received: from matrix.gatewaynet.com (localhost [127.0.0.1]) by matrix.gatewaynet.com (8.12.5/8.12.5) with ESMTP id h4CKUB1s018475; Mon, 12 May 2003 18:30:11 -0200 Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.12.5/8.12.5/Submit) with ESMTP id h4CKUB0G018471; Mon, 12 May 2003 18:30:11 -0200 Date: Mon, 12 May 2003 18:30:11 -0200 (GMT+2) From: Achilleus Mantzios To: Lucas Lain Cc: Bruno Wolff III , Subject: Re: epoch to timestamp In-Reply-To: <20030512120544.5bb9c4c6.lainl@aconectarse.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-38.4 required=5.0 tests=BAYES_00,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, QUOTE_TWICE_1,REPLY_WITH_QUOTES,SIGNATURE_LONG_DENSE, 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: 200305/216 X-Sequence-Number: 13381 On Mon, 12 May 2003, Lucas Lain wrote: > i really dont know how to do it ... i'm a newbie > it is something like this? > > select cast(105471234 AS abstime) ... > > and then? Just do select 105471234::abstime::timestamp; > > > > On Fri, 9 May 2003 16:36:48 -0500 > Bruno Wolff III wrote: > > > On Fri, May 09, 2003 at 18:05:45 -0300, > > Lucas Lain wrote: > > > > > > can anyone tell me how to convert an epoch date to timestamp format?? > > > > If the epoch date is an integer with seconds since the unix epoch, > > you can cast it to abstime and then to timestamp. > > > > > -- ================================================================== Achilleus Mantzios S/W Engineer IT dept Dynacom Tankers Mngmt Nikis 4, Glyfada Athens 16610 Greece tel: +30-210-8981112 fax: +30-210-8981877 email: achill@matrix.gatewaynet.com mantzios@softlab.ece.ntua.gr