title: Oracle Date Format with input Parametres - PLSQL
body: <p>I'm getting an error as follows: 
  ORA-01858 - a non-numeric character was found where a numeric character was expected. 
  Although it isn't really accurate, I believe it's related to the date formatting in the following lines. </p>
  
  <pre><code>ELSIF par_report_eff_date_start IS NOT NULL AND par_report_eff_date_start = to_date(par_report_eff_date_start, 'fxdd-mm-yyyy')
  </code></pre>
  
  <p>and</p>
  
  <pre><code>ELSIF par_report_eff_date_end IS NOT NULL AND par_report_eff_date_end = to_date( par_report_eff_date_end ,'fxDD-MM-YYYY')
  </code></pre>
  
  <p>I'm trying to get the parameters to render date in the format of 'dd/mm/yyyy' as it is passed in, but i'm not sure how to get around this. </p>
  
  <p>I have looked, but have limited web access at work, so I can't use the regular sites. </p>
  
  <pre><code>       procedure collect_mon_comm_bal_data_part (
    par_report_eff_date_start DATE DEFAULT NULL, --dd/mm/yyyy;
    par_report_eff_date_end  DATE DEFAULT NULL) --dd/mm/yyyy;
    is 
  
  v_report_eff_date_start DATE;
  v_report_eff_date_end DATE;
  
  BEGIN
  
    IF par_report_eff_date_start IS NULL 
      THEN 
      -- Oracle job runs at the beginning of each month
        select trunc(trunc(sysdate,'Mon')-1,'Mon')
        into v_report_eff_date_start
        from dual;   -- Start of month Var
      ELSIF par_report_eff_date_start IS NOT NULL AND par_report_eff_date_start = to_char(par_report_eff_date_start, 'fxdd/mm/yyyy')
          THEN
            v_report_eff_date_start := par_report_eff_date_start;
            DBMS_OUTPUT.PUT_LINE(par_report_eff_date_start || 'Is The Start Date');
      ELSE  
            DBMS_OUTPUT.PUT_LINE(par_report_eff_date_start || 'Is is the wrong format, needs tp be in dd/mm/yyyy'); 
            GOTO the_end;
    END IF;
  
  
    IF par_report_eff_date_end IS NULL 
      THEN 
      -- Oracle job runs at the beginning of each month
        select  trunc(sysdate,'MM')-1
        into v_report_eff_date_end
        from dual;   -- Start of month Var
      ELSIF par_report_eff_date_end IS NOT NULL AND par_report_eff_date_end = to_char(par_report_eff_date_end, 'fxdd/mm/yyyy')
          THEN
            v_report_eff_date_end := par_report_eff_date_end;
            DBMS_OUTPUT.PUT_LINE(par_report_eff_date_end || 'Is The Start Date');
       ELSE
            DBMS_OUTPUT.PUT_LINE(par_report_eff_date_end || 'Is is the wrong format, needs tp be in dd/mm/yyyy');
              GOTO the_end;
    END IF;
  END;
  </code></pre>