2 Replies Latest reply: Nov 10, 2011 2:44 AM by Arndt Binninger RSS

    Passing date parameter with time fraction?

    Arndt Binninger
      Hi,

      we have a procedure with a date parameter, which we want to start via scheduler.
      So we created a program with an argument of type DATE:

      Dbms_Scheduler.Define_Program_Argument(
                program_name                    => 'PRG_FILL_BARCODE_PAKET',
                argument_position          => 4,
                argument_name                => 'P_BISDAT',
                argument_type                    => 'DATE'
                );

      Then we fill the argument value with a date, which includes a time fraction (e.g. '08.11.2011 05:30'):

      Dbms_Scheduler.Set_Job_Argument_Value(
           job_name                          => JOBNAME,
           argument_position => 4,
           argument_value           => TO_DATE (v_bisdat, 'DD.MM.YYYY HH24:MI')
           );

      The problem is that oracle cuts of the time fraction, so the procedure receives only '08.11.2011 00:00' instead of '08.11.2011 05:30'.
      Any ideas? Do we have to use ANYTYPE to pass a date argument?

      Regards,
      Arndt