Importing CSV handling dates
<p>I am using the following code to import a CSV file. </p>

<pre><code>       try
        {
            OleDbConnection ExcelConnection = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pathName + ";Extended Properties=Text;");
            OleDbCommand ExcelCommand = new OleDbCommand(@"SELECT * FROM " + fileName, ExcelConnection);

            OleDbDataAdapter ExcelAdapter = new OleDbDataAdapter(ExcelCommand);

            ExcelConnection.Open();

            DataSet ExcelDataSet = new DataSet();
            ExcelAdapter.Fill(ExcelDataSet);

            ExcelConnection.Close();
            return ExcelDataSet;
        }
        catch
            (Exception ex)
        {
            MessageBox.Show("Cannot read excel file");
            return null;
        }
</code></pre>

<p>Here when a column has a value as </p>

<blockquote>
  <p>19.10.2011 10:08:56 GMT</p>
</blockquote>

<p>it turns as </p>

<blockquote>
  <p>19.102</p>
</blockquote>

<p>Can anyone help me ?</p>

<p>Regards,</p>
