Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 45FAC475484 for ; Wed, 3 Apr 2002 18:47:49 -0500 (EST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 76DCFD602; Wed, 3 Apr 2002 15:47:48 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 5A5DC5BFC; Wed, 3 Apr 2002 15:47:48 -0800 (PST) Date: Wed, 3 Apr 2002 15:47:48 -0800 (PST) From: Stephan Szabo To: Chris Pesko Cc: Subject: Re: help on to_date conversion please.... In-Reply-To: <4.3.2.7.2.20020403153945.00bb2030@mailhost.organic.com> Message-ID: <20020403154655.Y98769-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200204/45 X-Sequence-Number: 3934 On Wed, 3 Apr 2002, Chris Pesko wrote: > Never mind. Just figured it out. Need to grab the substring from 2 for 8 > from the to_char result because it holds character number 1 reserv ed for + > or - signs. + is default or white space. I think that is the reason. Any > other input????? 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)