title: DateTime to int
body: <p>How to covert DateTime to int</p>
  
  <pre><code>  DateTime now = DateTime.Now;
    int va = now.Year;
  
    // error here
    int vd = int.Parse(mYear.Value.ToShortDateString()); 
  
    result = Convert.ToString(va - vd);
  </code></pre>
  
  <blockquote>
    <p>Input string was not in a correct format</p>
  </blockquote>