Skip to Content
author's profile photo Former Member
Former Member

Oracle DB, TO_DATE and Stored Procedure

Hi,

I'm trying to insert the following date and time into an oracle DB as part of a stored procedure

'2008-04-17 15:08:06' ..

In my mapping the target field is set to string with the attributes type = DATE and isInput = 1

I have to use the to_date function so I end up with this value....

TO_DATE('2008-04-17 15:08:06', 'YYYY-MM-DD HH24:MI:SS')

In the stored procedure the type is i_IssueDate is Date.

This doesn't work as I get this error: java.lang.NumberFormatException: For input string: "TO_DATE('2008"

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 21, 2008 at 04:05 PM

    Hi

    Did you chk this blog

    DATE/TIME datatypes and Oracle Database

    BR

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2008 at 11:19 AM

    I solved this problem.

    I removed the TO_DATE function completely.

    I set the attribute type to "TIMESTAMP"

    Thats all that is requried!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.