Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 7D1952E02AE for ; Wed, 12 Mar 2008 20:20:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 30401-10 for ; Wed, 12 Mar 2008 20:20:10 -0300 (ADT) X-Greylist: delayed 00:22:00.920994 by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id 819CD2E01DA for ; Wed, 12 Mar 2008 20:20:10 -0300 (ADT) Received: from eternity.local (S01060016b6e9a1b5.cg.shawcable.net [68.146.104.32]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m2CMwZAM025530 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 12 Mar 2008 15:58:36 -0700 Message-ID: <47D85FFF.20300@commandprompt.com> Date: Wed, 12 Mar 2008 16:58:07 -0600 From: Aurynn Shaw User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: =?UTF-8?B?IlZhbHRlciBEb3VnbGFzIExpc2LDtGEgSnIuIg==?= CC: pgsql-sql@postgresql.org Subject: Re: Timestamp, epoch and a bit confusion References: <200803121936.14106.douglas@trenix.com.br> In-Reply-To: <200803121936.14106.douglas@trenix.com.br> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Wed, 12 Mar 2008 15:58:36 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/62 X-Sequence-Number: 30390 Valter Douglas LisbĂ´a Jr. wrote: > Hello all. > > I working with postgreSQL for a couple of months, and now I trying to convert > timestamp columns in epoch and epoch to timestamp columns. So far I could > reach, all SQL I find by 'googling' returns an error. SELECT extract (epoch from your_time_field) from your_table; SELECT to_timestamp(your_epoch_field) from your_table; > > Where can I find some documentation with this convertions fo 8.2.x branch? I > think the Manual on the main site is not very helpfull in this case!!! ;-( > And you can check out the docs @ http://www.postgresql.org/docs/current/static/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT Hope that helps, -- Aurynn Shaw The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564 ext 103 PostgreSQL Replication, Consulting, Custom Development, 24x7 support ashaw@commandprompt.com