X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 2CA28476141 for ; Thu, 8 May 2003 15:53:27 -0400 (EDT) Received: from wolff.to (wolff.to [66.93.249.74]) by postgresql.org (Postfix) with SMTP id 92CBB474E4F for ; Thu, 8 May 2003 15:53:26 -0400 (EDT) Received: (qmail 4240 invoked by uid 500); 8 May 2003 19:54:41 -0000 Date: Thu, 8 May 2003 14:54:41 -0500 From: Bruno Wolff III To: Alex Rice Cc: pgsql-sql@postgresql.org Subject: Re: epoch to date? Message-ID: <20030508195441.GB4152@wolff.to> Mail-Followup-To: Alex Rice , pgsql-sql@postgresql.org References: <7784EC60-818D-11D7-A998-000393529642@ARCplanning.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7784EC60-818D-11D7-A998-000393529642@ARCplanning.com> User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-38.0 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_MUTT 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/182 X-Sequence-Number: 13347 On Thu, May 08, 2003 at 13:44:22 -0600, Alex Rice wrote: > I have a column with seconds since the unix epoch. How to convert it to > date? Sorry I couldn't find it in the docs. One way is: select 'epoch'::timestamp + 1234 * '1 second'::interval; Another is: select 1234::abstime;