Re: ORA-01861: literal does not match format string

From: joel garry <joel-garry_at_home.com>
Date: Wed, 11 Feb 2009 13:33:58 -0800 (PST)
Message-ID: <8908471d-99bf-4d60-99a2-065316394c46_at_w24g2000prd.googlegroups.com>



On Feb 10, 11:54 pm, Carlos <miotromailcar..._at_netscape.net> wrote:
> On 11 feb, 00:16, Palooka <nob..._at_nowhere.com> wrote:
>
>
>
>
>
> > Noons wrote:
> > > shweta.kapar..._at_googlemail.com wrote,on my timestamp of 11/02/2009 1:05 AM:
>
> > >> SQL> select * from T1 where last_update=to_date('2008-02-10
> > >> 05:59:17','yyyy-mm-dd hh24:mi:ss');
>
> > >> NAME                                 TYPE        VALUE
> > >> ------------------------------------ -----------
> > >> ------------------------------
> > >> nls_calendar                         string
> > >> nls_comp                             string
> > >> nls_currency                         string
> > >> nls_date_format                      string      dd-mon-rrrr
> > >> nls_date_language                    string
> > >> nls_dual_currency                    string
> > >> nls_iso_currency                     string
> > >> nls_language                         string      american
> > >> nls_length_semantics                 string      byte
> > >> nls_nchar_conv_excp                  string      FALSE
> > >> nls_numeric_characters               string      ,.
> > >> nls_sort                             string
> > >> nls_territory                        string      america
> > >> nls_time_format                      string
> > >> nls_time_tz_format                   string
> > >> nls_timestamp_format                 string
> > >> nls_timestamp_tz_format              string
>
> > >> SQL>
>
> > >> We cannt chnage the java code immediately to use to_date.
> > >> so how to avoid such error:?
>
> > > Set your nls_date_format parameter to match what you are using in java:
>
> > > alter system set nls_date_format=
> > > 'yyyy-mm-dd hh24:mi:ss' scope=both;
>
> > > Be aware that this changes the default date format for ALL sessions and
> > > users in future.
> > > If you only want it for the java session(s), then you must find a way to
> > > add a
> > > alter session for the same parameter to set the format for only those.
>
> > Or write the application properly, as Sybrand recommends. Not arguing
> > with you Noons, since you are of course perfectly correct. One just gets
> > sick of this shoddy crappy application code.
>
> > Palooka
>
> Let's see:
>
> One question:
>
> >>"We cannt chnage the java code immediately to use to_date.
>
> so how to avoid such error:? "
>
> Three answers with different solutions, one of them 'a-la-Sybrand' ;-)
>
> One answer completely useless with a flame, some 'bad words' and a
> little bit of flattery.
>
> This is the usenet, I guess...
>
> Cheers.
>
> Carlos.

Well, there's always iamthenode.com. Perfectly politically correct, technologically amusing, useless, and makes people barf.

jg

--
_at_home.com is bogus.
"There have been a few attempts at promoting C compilers that
correctly compile correct programs, and diagnose issues with incorrect
ones. These have been doomed by the overwhelming mass of incorrect
programs." - Michael Albaugh
Received on Wed Feb 11 2009 - 15:33:58 CST

Original text of this message