title: Should I use ToString() or GetDateTimeFormats() to format a DateTime?
body: <p>I know how to format a <code>DateTime</code> as a <code>String</code>. There may be many ways to format a <code>DateTime</code> as a <code>String</code>, and I have found few questions related to <code>DateTime</code> formatting.</p>
  
  <p>But I found and tried two ways:</p>
  
  <ol>
  <li><code>GetDateTimeFormats()</code></li>
  <li><code>ToString("MM/dd/yyyy")</code></li>
  </ol>
  
  <p>I tried this code:</p>
  
  <pre><code>public static class DateTimeFormates
  {
      public static string FormatMyDate(this DateTime DT)
      {
          // My Actual Date Time Comes in this Format
          //8/23/2013 12:43:12 PM
  
          // I'm expecting Format like below
  
          String FormatWayOne = DT.GetDateTimeFormats()[3];
          //08/23/2013
  
          String FormatWayTwo = DT.ToString("MM/dd/yyyy");
          //08/23/2013
  
          return FormatWayOne;
      }
  }
  </code></pre>
  
  <p>I have a <code>Global</code> class with <code>Global</code> method to format a <code>DateTime</code> as a <code>String</code>. But here what I want to know which method is the best practice so I can use it? The method is called all over the application.</p>