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: Not a valid month, please HELP!!

Re: Not a valid month, please HELP!!

From: Tine Zorko <tine.zorko_at_email.si>
Date: Tue, 28 Oct 2003 21:18:22 +0100
Message-ID: <bnmiug$d92$1@planja.arnes.si>


Check your NLS_LANGUAGE parameter in the database.

SELECT * from v$nls_parameters;

According to attached documentation link, change the value respectively. You change the value with ALTER SESSION SET NLS_LANGUAGE=YOUR_LANGUAGE;

For example. If I want to execute statement:

select to_date('11/20/2003 10:21:00 PM', 'MM/DD/RRRR HH:MI:SS AM') from dual;

.. oracle will complain when my nls_language is set to SLOVENIAN. after I set it to AMERICAN, everything works fine.

Hope it helps.

Tine

Link: http://download-uk.oracle.com/docs/cd/A87861_01/NT817EE/index.htm Look for " Date Format Elements and National Language Support"

TSM wrote:
> Hello, I'm writing a JSP application with an underlying Oracle
> Database. I have the following problem: the same SQL statement works
> fine in the SQL+ console and in SQL Navigator, but it fails in the
> application.
>
> The statement is this:
> INSERT INTO operatori (id_operatore, matr_operatore, cognome, nome,
> rif_utente, data_aggiornamento) VALUES( 'XXX', 'XXX', 'XXX',
> 'XXX', 'XXX', TO_DATE('28/10/2003 11:47:25', 'DD/MM/YYYY
> hh24:mi:ss') )
>
> It gives this result:
>
> java.lang.Exception: java.sql.SQLException: ORA-01843: mese non
> valido
>
> at braccialetto.GestioneLog.insertLogApplication(GestioneLog.java:44)
> at braccialetto.operatore.Esecuzione.insertOperatore(Esecuzione.java:160
> )
> at operatore._0002foperatore_0002fGestioneOperatore_0002ejspGestioneOper
> atore_jsp_0._jspService(_0002foperatore_0002fGestioneOperatore_0002ejspGestioneO
> peratore_jsp_0.java:213)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspSer
> vlet.java:130)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspSer
> vlet.java:282)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:4
> 29)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:4
> 05)
> at org.apache.tomcat.core.Handler.service(Handler.java:287)
> at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372
> )
> at org.apache.tomcat.core.ContextManager.internalService(ContextManager.
> java:797)
> at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743
> )
> at org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
> n(HttpConnectionHandler.java:213)
> at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:
> 416)
> at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java
> :501)
> at java.lang.Thread.run(Thread.java:484)
>
> HEEEEEEEELP!!
>
> TSM (Carmine)
Received on Tue Oct 28 2003 - 14:18:22 CST

Original text of this message

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