Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id BCBB14763DB for ; Thu, 3 Oct 2002 11:31:55 -0400 (EDT) Received: from matrix.gatewaynet.com (unknown [217.19.69.50]) by postgresql.org (Postfix) with ESMTP id 713B24763D3 for ; Thu, 3 Oct 2002 11:31:54 -0400 (EDT) Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.11.6/8.11.6) with ESMTP id g93FgqB23932; Thu, 3 Oct 2002 18:42:52 +0300 Date: Thu, 3 Oct 2002 18:42:51 +0300 (EEST) From: Achilleus Mantzios To: Roberto Mello Cc: pgsql-sql@postgresql.org Subject: Re: epoch to date In-Reply-To: <20021003150927.GB20452@cc.usu.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/42 X-Sequence-Number: 9760 On Thu, 3 Oct 2002, Roberto Mello wrote: > Hi all, > > Maybe I missed something obvious, but is there a built-in function to > convert epoch to date? I couldn't find it in the documentation for extract > and friends. well to compute epoch timestamp # SELECT (now() -(extract(epoch from now())::int4)/86400)::datetime ; if thats what you asked :) > > Thanks, > > -Roberto > > -- > +----| Roberto Mello - http://www.brasileiro.net/ |------+ > + Computer Science Graduate Student, Utah State University + > + USU Free Software & GNU/Linux Club - http://fslc.usu.edu/ + > All in all, you're just another brick on the wall... > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > ================================================================== Achilleus Mantzios S/W Engineer IT dept Dynacom Tankers Mngmt Nikis 4, Glyfada Athens 16610 Greece tel: +30-10-8981112 fax: +30-10-8981877 email: achill@matrix.gatewaynet.com mantzios@softlab.ece.ntua.gr