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: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
Cc: leif(at)danmos(dot)dk, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: to_date problem
Date: 2001-03-15 15:08:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> writes:
>  Hmm, now I see Oracle and it allows correct parse this dirty query...

>  SVRMGR> select to_date('2001-3-5 10:00', 'YYYY-FMMM-FMDD HH24:MI') from
> dual;
> ---------
> 05-MAR-01
> 1 row selected.

Does it?  Your example shows it with FM selected.  What happens in
Oracle without the FM?

Still, Leif's example surprises me.  Why does it pick up the '3' but
ignore the '5'?  Seems to me that the presence of whitespace should be
enough to cue the thing that it's done seeing the day field, FM or no.
In fact, I can't see a good reason for FM to affect the behavior of
input conversion at all.

			regards, tom lane

In response to


pgsql-interfaces by date

Next:From: Karel ZakDate: 2001-03-15 15:38:48
Subject: Re: to_date problem
Previous:From: St├ęphane EVEILLARDDate: 2001-03-15 12:37:26
Subject: Re: Big trouble with libpq++

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