Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B0F2D2E00BF for ; Wed, 12 Mar 2008 21:41:32 -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 55716-10 for ; Wed, 12 Mar 2008 21:41:30 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from message.trenix.com.br (201-0-136-221.dial-up.telesp.net.br [201.0.136.221]) by postgresql.org (Postfix) with ESMTP id DD3452E00BE for ; Wed, 12 Mar 2008 21:41:29 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by message.trenix.com.br (Postfix) with ESMTP id 15209504063 for ; Wed, 12 Mar 2008 21:41:33 -0300 (BRT) X-Virus-Scanned: amavisd-new at trenix.com.br Received: from message.trenix.com.br ([127.0.0.1]) by localhost (message.trenix.com.br [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4kdmdkEIbr-A for ; Wed, 12 Mar 2008 21:41:27 -0300 (BRT) Received: from gigastation.trenix.com.br (unknown [192.168.255.150]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: douglas@trenix.com.br) by message.trenix.com.br (Postfix) with ESMTP id 735E5504062 for ; Wed, 12 Mar 2008 21:41:27 -0300 (BRT) From: "Valter Douglas =?iso-8859-1?q?Lisb=F4a?= Jr." Organization: Trenix - IT Solutions To: pgsql-sql@postgresql.org Subject: Re: Timestamp, epoch and a bit confusion Date: Wed, 12 Mar 2008 21:41:01 -0300 User-Agent: KMail/1.9.7 References: <200803121936.14106.douglas@trenix.com.br> <47D85FFF.20300@commandprompt.com> In-Reply-To: <47D85FFF.20300@commandprompt.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200803122141.02280.douglas@trenix.com.br> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.668 tagged_above=0 required=5 tests=AWL=-0.556, RCVD_IN_PBL=0.509, RCVD_IN_SORBS_DUL=1.615, RDNS_DYNAMIC=0.1 X-Spam-Level: * X-Archive-Number: 200803/63 X-Sequence-Number: 30391 Thank you, very much. I pass through extract(epoch from x). On Wednesday 12 March 2008 19:58:07 Aurynn Shaw wrote: > Valter Douglas Lisb=C3=B4a 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 f= ar > > 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#FUN= CT >IONS-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 =2D-=20 Valter Douglas Lisb=F4a Jr. S=F3cio-Diretor Trenix - IT Solutions "Nossas Id=E9ias, suas Solu=E7=F5es!" www.trenix.com.br contato@trenix.com.br Tel. +55 19 3402.2957 Cel. +55 19 9183.4244