Received: from ara.zf.jcu.cz (ara.zf.jcu.cz [160.217.161.4]) by postgresql.org (Postfix) with ESMTP id B310C475904 for ; Thu, 4 Apr 2002 03:37:06 -0500 (EST) Received: from ara.zf.jcu.cz (LOCALHOST [127.0.0.1]) by ara.zf.jcu.cz (8.12.1/8.12.1/Debian -5) with ESMTP id g348alBK026492; Thu, 4 Apr 2002 10:36:47 +0200 Received: (from zakkr@localhost) by ara.zf.jcu.cz (8.12.1/8.12.1/Debian -5) id g348ahcH026491; Thu, 4 Apr 2002 10:36:43 +0200 Date: Thu, 4 Apr 2002 10:36:43 +0200 From: Karel Zak To: Chris Pesko Cc: Stephan Szabo , pgsql-admin@postgresql.org Subject: Re: help on to_date conversion please.... Message-ID: <20020404103642.D20127@zf.jcu.cz> References: <4.3.2.7.2.20020403153945.00bb2030@mailhost.organic.com> <20020403154655.Y98769-100000@megazone23.bigpanda.com> <4.3.2.7.2.20020403160156.046526a0@mailhost.organic.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <4.3.2.7.2.20020403160156.046526a0@mailhost.organic.com>; from cpesko@organic.com on Wed, Apr 03, 2002 at 04:02:11PM -0800 X-Archive-Number: 200204/48 X-Sequence-Number: 3937 On Wed, Apr 03, 2002 at 04:02:11PM -0800, Chris Pesko wrote: > Thanks. That seems a better way to go. The PostgreSQL docs is your good friend :-) > At 03:47 PM 4/3/02 -0800, Stephan Szabo wrote: > > >You might want to try the FM format on the to_char string... > >sszabo=# select to_date(to_char(20020101, 'FM99999999'),'yyyymmdd'); > > to_date > >------------ > > 2002-01-01 > >(1 row) The extra space is very common for all to_...() outputs/inputs and is needful thing of this. Don't ask me why.. it's Oracle idea. Karel -- Karel Zak http://home.zf.jcu.cz/~zakkr/ C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz