title: How do I get a date in MMM, YYYY format using C#
body: <p>I am writing a selenium automated test where I have to verify that the dates on the x-axis of the graph (shown) are correct. These dates change based on a drop down we have in the web application. (Ignore the arrow :))</p>
  
  <p><a href="http://i.stack.imgur.com/2zMBP.png" rel="nofollow">enter image description here</a></p>
  
  <p>I'm trying to generate the date in the MMM, YYYY format and compare it with the date elements in the graph</p>
  
  <p>I have the following code so far:</p>
  
  <pre><code> string circleDate2 = date.Month.ToString("MMM") + ", " + date.Year.ToString("YYYY");
  </code></pre>
  
  <p>however this just outputs MMM, YYYY on the console.</p>
  
  <p>How do I generate the date in MMM, YYYY format and then add or subtract another month so I can verify all the date elements on the page?</p>