title: how to convert datetime to short date?
body: <p>i have a table called as X and this table has a field known as X_DateTime respectively, which has value like 2012-03-11 09:26:37.837.</p>
  
  <p>i want to convert the above datetime value to this format yyyy-MM-dd (2012-03-11) and literally remove the Time (09:26:37.837)</p>
  
  <p>i have used something like below code</p>
  
  <pre><code>DateTimeFormatInfo format = new DateTimeFormatInfo();
  format.ShortDatePattern = "yyyy-MM-dd";
  format.DateSeparator = "-";
  DateTime date = 2012-03-11 09:26:37.837;
  DateTime shortDate = Convert.ToDateTime(date , format);
  </code></pre>
  
  <p>please help me...</p>
  
  <p>i am using C# as my language.</p>
  
  <p>thanks,</p>