C#:How to customize datetime format or to convert DateTime to String with required format
<p>I have a DateTime string in 24 HOURS format .. "2009-12-31T23:59:59"
<br>I want it in this format .. "12/31/2009 23:59:59" that is: "MM/DD/YYYY HH:MM:SS"<br><br>
When I tried to covert it to string I am getting "12/31/2009 11:59:59 PM" .. though I can write a code for <b>string manupulation</b> .. it doesn't seem to be the efficient one .. Moreover the case become worst when I have dateTime value like "2009-1-1T1:19:15" .. here, as the <b>string length is varying</b>, I can't even trace the value of Hours and months using substring() and convert.ToInt() ..<br><br> I am using visual studio 2005, It is throwing error saying "Cannot implicitely convert DateTime to String" when I write this statement:
..<br>
result = Convert.ToString(dateValue);</p>

<p>I simplify my question:
Is there any method to convert "yyyy-mm-ddThh:mm:ss" format to "mm/dd/yyyy hh:mm:ss" .. And it must work in visual studio 2005 ..</p>
