Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id BC9E89F9D5F for ; Wed, 5 Sep 2007 05:16:40 -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 56587-04 for ; Wed, 5 Sep 2007 05:16:38 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from ptb-relay03.plus.net (ptb-relay03.plus.net [212.159.14.214]) by postgresql.org (Postfix) with ESMTP id EB65C9F9C72 for ; Wed, 5 Sep 2007 05:16:37 -0300 (ADT) Received: from [84.51.143.99] (helo=server3.office.archonet.com) by ptb-relay03.plus.net with esmtp (Exim) id 1ISq3v-000536-7V; Wed, 05 Sep 2007 09:16:35 +0100 Received: from [192.168.1.36] (dell36.office.archonet.com [192.168.1.36]) by server3.office.archonet.com (Postfix) with ESMTP id 842E8274054; Wed, 5 Sep 2007 09:16:34 +0100 (BST) Message-ID: <46DE65E2.6090904@archonet.com> Date: Wed, 05 Sep 2007 09:16:34 +0100 From: Richard Huxton User-Agent: Thunderbird 2.0.0.6 (X11/20070728) MIME-Version: 1.0 To: Sabin Coanda CC: pgsql-sql@postgresql.org Subject: Re: ISO time zone format References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/47 X-Sequence-Number: 29260 Sabin Coanda wrote: > Hi there, > > I'd like to format a time stamp with time zone as ISO pattern (e.g. > 1999-01-08 04:05:06 -8:00) > > I found the patterns for all the timestamp parts, from "Data Type Formatting > Functions" Postgresql documentation, excepting the numeric ISO time zone. > > Please suggest the appropiate pattern for that. If your DateStyle is set to ISO that's the default format. You don't need to use to_char() Or am I missing your point? -- Richard Huxton Archonet Ltd