Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle Error - ORA-01861: literal does not match format string"

Re: Oracle Error - ORA-01861: literal does not match format string"

From: Rene Nyffenegger <rene.nyffenegger_at_gmx.ch>
Date: Fri, 29 Apr 2005 21:34:47 +0000 (UTC)
Message-ID: <d4u99n$kvk$1@klatschtante.init7.net>


On 2005-04-29, Abhishek <abhitriv_at_netscape.net> wrote:
> In my application working on oracle 10g database and Red Hat Linux
> Advanced Server 2.1 on HP Itanium pcs.
>
> When i use in my query statements like
>
> update table1 set colmn_dt = to_date(sysdate,'DD/MON/YYYY');
>
> it is giving me the following error.
>
> ORA-01861: literal does not match format string"
>
>
> The resaon for this is i can understand that i m trying to use a date
> type column in a to_date function.
>
> What i cannot undertand is that why did this has not given me the
> error uptil now(the application has been running for one year approx)
> and now also it is giving me the error for some cases only, otherwise
> this query runs fine.

to_date(...) converts something to a date type. sysdate is _already_ a date-type. So, no need to convert it to a date-type. You probably want to_char.

hth
Rene

-- 
  Rene Nyffenegger
  http://www.adp-gmbh.ch/
Received on Fri Apr 29 2005 - 16:34:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US