pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: A. Kretschmer <andreas.kretschmer@schollglas.com>
Cc: pgsql-sql@postgresql.org, "anru chen" <ctx2002@gmail.com>
Subject: Re: to_date function
Date: Fri, 07 Sep 2007 10:25:57 -0400
Message-ID: <20904.1189175157@sss.pgh.pa.us> (raw)
In-Reply-To: <20070907063519.GC10560@a-kretschmer.de>
References: <9bb664980709062222n13f66543kf621094604a9944e@mail.gmail.com>
	<20070907063519.GC10560@a-kretschmer.de>

"A. Kretschmer" <andreas.kretschmer@schollglas.com> 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



view thread (5+ messages)  latest in thread

Message-ID: <20904.1189175157@sss.pgh.pa.us>
Permalink:  ../20904.1189175157@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20904.1189175157@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andreas.kretschmer@schollglas.com, ctx2002@gmail.com
  Subject: Re: to_date function
  In-Reply-To: <20904.1189175157@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox