title: java.sql.SQLException: ORA-01841: (full) year must be between -4713 and +9999, and not be 0
body: <p>I have scussfully read B details from Config properti file .Now i'm trying to excute the query by passing from and to date values through command line arguments.I'm getting below exception . please let me know how to pass date values in to my query via command line arguments.
  <strong>Note:</strong> I have created excutalbel Jar file with all library files.</p>
  
  <p><strong>Output:</strong><br>
              java -jar CreateExcelFile1.jar 2014/01/20 2014/01/24</p>
  
  <pre><code>        Command line arguments length is 2
         Array index 0 value is 2014/01/20
        Array index 1 value is 2014/01/24
         Connection Successful
           java.sql.SQLException: ORA-01841: (full) year must be between -4713 and +9999, and not be 0
  </code></pre>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>   public class CreateExcelFile extends DbConnection{
     public static void main(String[] args) {
    try{
  System.out.println("Command line arguments length is " + args.length);
  System.out.println("Array index 0 value is " + args[0]);
  System.out.println("Array index 1 value is " + args[1]);
        Connection con = openConnection();
        PreparedStatement st=con.prepareStatement("Select a.oi_intervention_id ,a.oi_region,a.oi_mrn,b.opi_title, a.oi_rx_nb ,a.oi_store_id,to_char(a.oi_doc_crtd_dt,'dd-MON-yy') as SheetName,to_char(a.oi_doc_crtd_dt,'dd-MON-yy hh.mi.ss,FF AM TZH:TZM') as oi_doc_crtd_dt,to_char(a.oi_doc_expry_dt,'dd-MON-yy hh.mi.ss,FF AM TZH:TZM') as oi_doc_expry_dt from rxesbopcs.OPCS_INTERVENTION a ,rxesbopcs.opcs_program_info b where trunc(a.oi_doc_crtd_dt) BETWEEN TO_DATE ('args[0]', 'yyyy/mm/dd') AND TO_DATE ('args[1]', 'yyyy/mm/dd') and b.opi_program_id = a.oi_program_id order by a.oi_doc_crtd_dt",ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
      ResultSet rs=st.executeQuery();
       createXls(rs);
       System.out.println("Your excel file has been generated!");
        closeConnection(con);
      } catch ( Exception ex ) {
       System.out.println(ex);
       }
       }
  </code></pre>