title: How to format a date in C# by example?
body: <p>C# provides a lot of flexibility when formatting a DateTime object for a string representation, however, one has to know all format strings to use that flexibility.</p>
  
  <p>If you want to display a date in the form "Fri, June 24", you can do it like this:  </p>
  
  <pre><code>DateTime someDate = DateTime.Now;
  Console.Write(someDate.ToString("ddd, MMMM dd"));
  </code></pre>
  
  <p>While this works well, it's hard for more sophisticated formats, especially for a developer working with it for the first time.</p>
  
  <p>I want to achieve the same results returned from the code above, but with this:</p>
  
  <pre><code>DateTime someDate = DateTime.Now;
  Console.WriteLine(someDate.ToString("Wed, June 12"));
  </code></pre>
  
  <p>The date specified as a string could be arbitrary. Essentially the format has to be determined by first parsing the date somehow. I know this approach has limitations (localization is one), but for simple scenarios it is much more understandable. Is there some way to do it apart from implementing it myself? I'm willing to use third-party libraries.</p>