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

Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-01843 question

Re: ORA-01843 question

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Tue, 29 Mar 2005 19:26:39 +0200
Message-ID: <42498fb8$0$11817$626a14ce@news.free.fr>

"yuhong snyder" <yuhong1999_at_hotmail.com> a ¨¦crit dans le message de news:vVf2e.2799$lq2.146_at_fe1.columbus.rr.com...
| when using a simple sql:SELECT LAST_DAY('01-Feb-95') FROM DUAL,the
| result always remind ORA-01843 error,invalid month,I think the format of
| month is correct.
|
| any hint?
|
| thanks!

use
to_date('01-Feb-95', 'DD-MON-YY','NLS_CALENDAR=GREGORIAN, NLS_DATE_LANGUAGE=AMERICAN')

(NLS parameters are only useful if these are not your current session values)

Always use the appropriate type, never rely on implicit conversion. last_day parameter type is DATE not CHAR.

Regards
Michel Cadot Received on Tue Mar 29 2005 - 11:26:39 CST

Original text of this message

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