Coversion from datetime of format "01 Oct 2012 23:59:59:000" to "01-10-2012 23:59:59" in C#
<p>My database contains the "From Date" in the form <strong>"2012-10-01 23:59:59.000"</strong> while taking the value to front end its comming as <strong>"01 Oct 2012 23:59:59:000"</strong>. So how can i get the date without "Oct" format. </p>

<p>I tried this also</p>

<pre><code>     foreach (DataRow dr in _dt.Rows)
    {
        dr["FromDt"] = String.Format("{0:dd-MM-yyyy hh:mm tt zzz}", dr["FromDt"]);
        dr["ToDt"] = String.Format("{0:dd-MM-yyyy}", dr["ToDt"]);  
    }
</code></pre>

<p>But Couldn't..</p>

<p>I refered all those quires iin stackoverflow to my best knowledge. Please sugest some ways.
Thanks in advance</p>

<p>I Used these following trils also-</p>

<pre><code>            DateTime dt = DateTime.Parse(dr["FromDt"].ToString());
        dr["FromDt"] = String.Format("{0:dd-MM-yyyy hh:mm tt zzz}", dr["FromDt"]);
</code></pre>
