On Thu, Apr 03, 2003 at 12:36:07PM +0100, Peter Haworth wrote:
> On Wed, 2 Apr 2003 13:23:45 -0700 (MST), scott.marlowe wrote:
> > While situations where 04-02 would get put in when the user meant 02-04,
> > at least enough of the 02-13 cases would throw an error that the user
> > would know they had been doing something wrong along the way and would
> > hopefully go back and look at their data.
>
> You wish.
>
> jnlstats=> select '2001-31-12'::date;
> date
> ------------
> 2001-12-31
> (1 row)
>
> jnlstats=> select to_date('2001-31-12','yyyy-mm-dd');
> to_date
> ------------
> 2003-07-14
> (1 row)
Are you sure is there 31 months ('mm')? I think better is:
test=# select to_date('2001-31-12','yyyy-dd-mm');
to_date
------------
2001-12-31
Karel
--
Karel Zak <zakkr@zf.jcu.cz>
http://home.zf.jcu.cz/~zakkr/