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: yuhong snyder <yuhong1999_at_hotmail.com>
Date: Tue, 29 Mar 2005 17:48:47 GMT
Message-ID: <3yg2e.38152$cC6.31274@fe2.columbus.rr.com>


I've got the answer,I used the sql :

   select to_char(sysdate,'DD-MON-RR') from dual the answer is not '29-Mar-05',the month format of the result is a Chinese word,I am not sure if it is because I operate that on a Chinese operating system.

regards!

Sybrand Bakker
> On Tue, 29 Mar 2005 17:05:31 GMT, yuhong snyder
> <yuhong1999_at_hotmail.com> wrote:
>
>

>>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!

>
>
> Never rely on the default date format of your client (which obviously
> isn't DD-MON-YY, because otherwise you wouldn't have gotten this error
> message) but always explicitly use the to_day function to eliminate
> ambiguity.
>
> select last_day(to_date('01-FEB-95','DD-MON-RR')) from dual
>
> is the correct select.
>
>
> --
> Sybrand Bakker, Senior Oracle DBA
Received on Tue Mar 29 2005 - 11:48:47 CST

Original text of this message

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