Advertisement

01.23.2008 at 02:44AM PST, ID: 23103913
[x]
Attachment Details

Why I got " java.text.ParseException: Unparseable date: - [setDateFormat]

[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.6
Zone:

Oracle 10.x

Hi Experts,

While using the testxmlproc procedure I am having problems parsing a date which is the format dd.MM.yy
I have tried to use the following procedure to set the date format :

CREATE OR REPLACE PROCEDURE testxmlproc(p_table_name IN VARCHAR2, p_XMLClob IN CLOB) IS
      v_insCtx       Dbms_Xmlsave.ctxType;
      v_rows            NUMBER;
BEGIN
      v_insCtx := Dbms_Xmlsave.newContext(p_table_name);
      Dbms_Xmlsave.setDateFormat(v_insCtx, 'dd.MM.yy');
      v_rows := Dbms_Xmlsave.insertXML(v_insCtx,p_XMLClob);
      --dbms_output.put_line('THEEEE : '||v_rows);
      Dbms_Xmlsave.closeContext(v_insCtx);
END;
/
show err

Unfortunately it is not working, as the parser still does not recognise the date format, it seems to want the time element.
I got error:

ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception: oracle.xml.sql.OracleXMLSQLException: ÔÞ
ORA-06512: at "SYS.DBMS_XMLSAVE", line 115
ORA-06512: at "SYS.TESTXMLPROC", line 7
ORA-06512: at line 1

I exec the procedure:
exec testxmlproc('gogtest','<?xml version="1.0"?><ROWSET><ROW><ID>1</ID><NAME>Sam</NAME><S_DATE>23/01/2008 11:10:09</S_DATE></ROW></ROWSET>');

-- gogtest => table that procedure insert data into.


please may somebody advise on some possible solutions?

Regards,
SAM.


Answered By: sdstuber
Expert Since: 10/06/2003
Accepted Solutions: 1846
Computer Expertise: Advanced
sdstuber has been an Expert for 5 years 3 months, during which he has posted 7484 comments and answered 1846 questions. sdstuber is just one of 761 experts in the Oracle 10.x Zone. 1 expert collaborated on this answer, which was graded an "A" by the asker.
 
 
20081119-EE-VQP-47 / EE_QW_2_20070628