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: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Tue, 29 Mar 2005 19:24:28 +0200
Message-ID: <6m3j41ldtkago1jrj0oq7f4qkufjat5524@4ax.com>


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:24:28 CST

Original text of this message

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