title: Wrong date format C#, Oracle
body: <p>I'm trying to get my date in the correct format(dd/mm/yyyy). At the moment its in this format: MM-DD-YYYY HH24:MI:SS When I change it to dd/mm/yyyy, it works in the database(Oracle). As soon as I run it in my app I get exception: IndexOutOfRange at :</p>
  
  <pre><code>this.InfoList9.Add(dr["start_rcv_datetime"].ToString());
  </code></pre>
  
  <p>Please see my code below.</p>
  
  <pre><code>public List&lt;String&gt; InfoList = new List&lt;String&gt;();
  
  private void populatelblDate()
  {
      conn.Open();
      string query;
      query = "select to_char(dg.start_rcv_datetime,'dd/mm/yyyy') from dc_pallet dp, dc_pallet_stock dps , dc_grv dg , sku s ,prod_size ps,colour c ,purch_order_carton_sku pocs , dc_crane_instruc dci where dps.pallet_id_no = '" + palletId.ToString() + "' and dp.pallet_id_no = dps.pallet_id_no and dg.dc_grv_id_no = dps.dc_grv_id_no and dg.order_no = dps.order_no and dg.company_id_no = dps.company_id_no and s.company_id_no = dps.company_id_no and s.company_id_no = dg.company_id_no and dps.company_id_no = c.company_id_no and dps.company_id_no = ps.company_id_no and s.prod_size_id_no = ps.prod_size_id_no and s.colour_id_no = c.colour_id_no and dps.company_id_no = ps.company_id_no and pocs.order_no = dps.order_no and pocs.carton_code = dps.carton_code and pocs.company_id_no = dps.company_id_no and pocs.sku_id_no = s.sku_id_no and dci.pallet_id_no(+) = dp.pallet_id_no";
  
      OracleCommand cmd = new OracleCommand(query, conn);
      OracleDataReader dr = cmd.ExecuteReader();
      while (dr.Read())
      {
          this.InfoList.Add(dr["start_rcv_datetime"].ToString());
      }
      dr.Close();
      conn.Close();
  }
  
  private void frmInfo_Load(object sender, EventArgs e)
  { 
      populatelblDate();
      lbl1.Text = this.InfoList[0];
  }
  </code></pre>
  
  <p>Then I have a prev and next button as well...</p>