Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 761299F926B for ; Fri, 7 Sep 2007 11:26:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 42440-04-2 for ; Fri, 7 Sep 2007 11:26:26 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 0A87A9F9467 for ; Fri, 7 Sep 2007 11:26:03 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l87EPvZ7020905; Fri, 7 Sep 2007 10:25:57 -0400 (EDT) To: "A. Kretschmer" cc: pgsql-sql@postgresql.org, "anru chen" Subject: Re: to_date function In-reply-to: <20070907063519.GC10560@a-kretschmer.de> References: <9bb664980709062222n13f66543kf621094604a9944e@mail.gmail.com> <20070907063519.GC10560@a-kretschmer.de> Comments: In-reply-to "A. Kretschmer" message dated "Fri, 07 Sep 2007 08:35:19 +0200" Date: Fri, 07 Sep 2007 10:25:57 -0400 Message-ID: <20904.1189175157@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/65 X-Sequence-Number: 29278 "A. Kretschmer" writes: > am Fri, dem 07.09.2007, um 17:22:30 +1200 mailte anru chen folgendes: >> seems like "to_date" function only work correctly for current month. > No, seems like to_char only work corrently if the length of the month > correctly... You need to use FMMonth not Month if you want it to be lax about the width of the month field. (I think we decided that's a bug and 8.3 will take it either way, but existing releases want the FM.) regards, tom lane