datetime.TryParseExact with different formats of values
<p>I have a json string that contains the values for a datetime and a parsing mechanism that looks like this:</p>

<pre><code>if (DateTime.TryParseExact(TheUserTimeString, "M.d.yyyy.HH.mm", CultureInfo.InvariantCulture, DateTimeStyles.None, out TheUserTime))
 {
    TheObject.UserDateTime = TheUserTime;
 }
</code></pre>

<p>The string TheUserTimeString is generated on the client. It can be <code>12.20.2011.13.21</code> and the code works fine but when it's <code>12.20.2011.13.2</code> the code breaks because the minutes are in one digit. And when the month is also in one digit... who knows.</p>

<p>What would be a better way to rewrite this parsing code so that the string gets parsed correctly every time.</p>

<p>Thanks for your suggestions.</p>
