Skip site navigation (1) Skip section navigation (2)

Re: to_date problem.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: lewwid(at)telusplanet(dot)net
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: to_date problem.
Date: 2002-06-13 14:30:40
Message-ID: 19268.1023978640@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
lewwid <lewwid(at)telusplanet(dot)net> writes:
> select to_date('January 12 2002','Month dd yyyy');       
>   to_date  
> ------------
>  0005-06-24     <----- Problem right there.

I think you need FM:

regression=# select to_date('January 12 2002','FMMonth dd yyyy');
  to_date
------------
 2002-01-12
(1 row)

Without that, the to_date scanner assumes it should be dealing with
fixed-width fields.  I think this is moderately broken myself, but
maybe that's the way Oracle does it...

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Massimiliano PanichiDate: 2002-06-13 16:37:43
Subject: cannot connect to database and strange error
Previous:From: lewwidDate: 2002-06-13 05:12:17
Subject: to_date problem.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group