Re: to_date function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org, "anru chen" <ctx2002(at)gmail(dot)com>
Subject: Re: to_date function
Date: 2007-09-07 14:25:57
Message-ID: 20904.1189175157@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"A. Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Huxton 2007-09-07 14:38:23 Re: SERIAL type's sequence is double-called or ?
Previous Message Aleksandr Vinokurov 2007-09-07 13:40:34 SERIAL type's sequence is double-called or ?