Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-01843 question
"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
![]() |
![]() |