You can use TryParseExact with several formats. It may seem a little tedious to list each format you want, but that way you'll be frank about it.
MSDN Documentation
, . en-US, ( ) .
DateTime dt;
var str = "6/5/2007";
if (DateTime.TryParseExact(str, "MM/DD/YYYY", new CultureInfo("en-US"), DateTimeStyles.None, out dt)
|| DateTime.TryParseExact(str, "MM/DD/YY", new CultureInfo("en-US"), DateTimeStyles.None, out dt))
{
}
DateTime.TryParseExact. :
DateTime dt;
var str = "6/5/2007";
if (DateTime.TryParseExact(str, new[] { "MM/DD/YYYY", "MM/DD/YY" }, new CultureInfo("en-US"), DateTimeStyles.None, out dt))
{
}