Data not getting saved properly in excel file from stream writer
<p><br>
i am trying to write the date format data into an  stream writer from  where  again am  writing into an excel file</p>

<p>here i am changing the  date  format like  this
  dd-MM-yyyy</p>

<pre><code>StreamWriter strmWriteText= new
StreamWriter(); DateTime ldtPubmonth;
lstrmWriteText.Write(dsPubmonth.ToString("dd-MM-yyyy"));
</code></pre>

<p>but  when ever data  gets  saved in the excel  file  the  format is    getting changed  like this.</p>

<p>1/5/2010</p>

<p>actaully  it  should be like this  01-05-2010</p>

<p>is there  any thing that i am going wrong  like  saving the data.</p>

<p>when   i check the value in command  window ?dsPubmonth.ToString("dd-MM-yyyy"));
 it  shows   the value     01-05-2010</p>

<p>i am using VS 2003, .net 1.1</p>

<p>thanks </p>
