title: use TryParseExact to format an integer value as a time
body: <p>I have an integer that will have the value of a year month and day. For example 20110504.</p>
  
  <p>I am using <code>TryPareseExact</code> to format it into <code>yyyy-MM-dd</code> but it is not working.</p>
  
  <p>Here is my function</p>
  
  <pre><code>public DateTime DateDisplay(int date)
  {
      DateTime dateValue;
  
      if (DateTime.TryParseExact(date.ToString(), "yyyy-MM-dd", DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None, out dateValue))
          return dateValue;
      else
          return DateTime.MinValue;
  }
  </code></pre>
  
  <p>It always go to the else and returns <code>DateTime.MinValue</code>. I want the date to be look like 2011/05/04. Would you be able to help me to identify where is my mistake?</p>