title: Passing date parameter from Unix to Oracle stored procedures
body: <p>I am writing a Unix shell script to invoke Oracle stored procedure with a date as an input parameter, but I am getting the following error. Kindly help me how to pass date parameter to Oracle stored procedure from Unix.</p>
  
  <p>The expected date format I need to pass to procedure is:</p>
  
  <pre><code>Start Date:       2013-09-12 00:00
  End Date  :       2013-09-04 00:00
  </code></pre>
  
  <p>ERROR Which I got while executing Unix script:</p>
  
  <pre><code>Connected to:
  Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  With the Partitioning, OLAP, Data Mining and Real Application Testing options
       SQL&gt; SP2-0552: Bind variable "00" not declared.
       SQL&gt; SP2-0734: unknown command beginning "echo " C3 ..." - rest of line ignored.
       SQL&gt; SP2-0734: unknown command beginning "echo "####..." - rest of line ignored.
  </code></pre>
  
  <p>My Unix shell script source:</p>
  
  <pre><code>date1='date'
  date1=$(/bin/date --date="$date1" -d "+0 day" +"%F")
  date1+=" 00:00"
  date2=$(/bin/date --date="$date1" -d "-8 day" +"%F")
  date2+=" 00:00"
  echo "Report Period"
  echo "Start Date:       "$date1
  echo "End Date  :       "$date2
  sqlplus preprdsm/PREPRDSM@pssm &lt;&lt;EOF
  execute C3_REPORT($date1,$date2)
  echo " C3 REPORT Executed Successfully "
  </code></pre>
  
  <p>My Oracle Stored procedure inputs are:</p>
  
  <pre><code>create or replace
  PROCEDURE C3_REPORT(
  START_DATE IN date,
  END_DATE IN date)
  IS
  emesg VARCHAR2(250); 
  </code></pre>