title: How can one parse a unknown datetime format in c#
body: <p>I'm trying to write a XML parser for TV Schedule Pro (<a href="http://sourceforge.net/p/tvschedulerpro" rel="nofollow">http://sourceforge.net/p/tvschedulerpro</a>).
  One particular challenge is in Parsing the DateTime reported by the date elements.</p>
  
  <p>According to the DTD file:</p>
  
  <blockquote>
    <p>All dates and times in this DTD follow the same format, loosely based
    on ISO 8601.  They can be 'YYYYMMDDhhmmss' or some initial substring,
    for example if you only know the year and month you can have 'YYYYMM'.
    You can also append a timezone to the end; if no explicit timezone is
    given, UTC is assumed.  Examples: '200007281733 BST', '200209',
    '19880523083000 +0300'.  (BST == +0100.)</p>
  </blockquote>
  
  <p>This is challenging situation, where I initially thought about using DateTimeFormatInfo.GetAllDateTimePatterns and using DateTime.TryParseExact, the last line about the timezones and particular format with any delimiters make it impossible to use the above.</p>
  
  <p>Is there a concise way to parse the above datetime specification or does one just need to keeping finding/adding various patterns to parse the strings as one finds them (looks like virtually endless combinations)</p>