4 Replies Latest reply: Aug 18, 2009 12:01 AM by sb92075 RSS

    ORA-01830: date format picture ends before converting entire input string

    688463
      I am working on this procedure, it has been created but giving this above error while execute with date parameter.

      PROCEDURE:

      1 create or replace procedure test (vdate IN date,inter in integer)
      2 AS
      3 vtime2 varchar2(20);
      4 i INTEGER := 0 ;
      5 BEGIN
      6 while i<=6
      7 loop
      8 COMPLETo(vdate);
      9 vtime2:= to_char(to_date(vdate,'DD-MON-YYYY HH24:MI')+i/24,'DD-MON-YYYY HH24:MI');
      10 dbms_output.put_line(vtime2);
      11 i := i + inter;
      12 END LOOP;
      13* END;
      SQL> /

      Procedure created.

      SQL> exec test('02-AUG-2009 02:00',2);
      BEGIN test('02-AUG-2009 02:00',2); END;

      *
      ERROR at line 1:
      ORA-01830: date format picture ends before converting entire input string
      ORA-06512: at "ADMIN.TEST", line 9
      ORA-06512: at line 1