Parse date time from string of format ddMMMyyyy hhmm (with Month-Name)
<p>I am kind of stuck into an issue where, I am unable to find out the way to parse the data and time from a string which, I am reading from a text file. So, the string I am getting is in following format:</p>

<p><strong>05SEP1998 2400</strong></p>

<p>and I am trying to parse it through the following code:</p>

<pre><code>string dateTimeStr = "05SEP1998 2400"

var provider = CultureInfo.InvariantCulture;

const string Format = "ddMMMyyyy hhmm";

var dateTime = DateTime.ParseExact(dateTimeStr, Format, provider);
</code></pre>

<p>But while parsing, the above code throws a FormatException: </p>

<p><code>String was not recognized as a valid DateTime.</code></p>

<p>Could anybody please help me fixing this issue?</p>
