0 Replies Latest reply: Jun 25, 2008 11:35 AM by martinley RSS

    input value not long enough for date format

    martinley
      Hi,

      I'm sorry if this has been addressed before. I have created a concurrent program that calls a custom pl/sql package. But the request is erroring with the below message:

      ORACLE error 1840 in FDPSTP

      Cause: FDPSTP failed due to ORA-01840: input value not long enough for date format
      ORA-06512: at "APPS.MHCB_ABSENCE_PKG", line 730
      ORA-06512: at "APPS.MHCB_ABSENCE_PKG", line 1068
      ORA-06512: at line 1
      .

      I am passing a parameter of 2008 with a datatype of 4 Characters in the concurrent request. I have looked at line 730 and the code is:

      PROCEDURE proc_calendar (
      p_year IN VARCHAR2,
      errbuf OUT VARCHAR2,
      retcode OUT NUMBER
      )
      IS
      l_start_date DATE
      := ADD_MONTHS (TO_DATE ('01/01/' || p_year, 'DD/MM/YYYY'),
      -12);
      l_end_date DATE
      := ADD_MONTHS (TO_DATE ('31/12/' || p_year, 'DD/MM/YYYY'), 12);

      This procedure works fine in TOAD and sqlplus, but it errors when called from the application.

      Can any one help me with this please?

      Many Thanks

      Martin