The DateTime..::.TryParse(String, DateTime%) method is similar to the DateTime..::.Parse(String) method, except that the TryParse(String, DateTime%) method does not throw an exception if the conversion fails.
The string s is parsed using formatting information in the current DateTimeFormatInfo object, which is supplied implicitly by the current thread culture. The s parameter must contain the representation of a date and time in one of the formats returned by the DateTimeFormatInfo..::.GetAllDateTimePatterns()()() method of the current culture.
This method tries to ignore unrecognized data, if possible, and fills in missing month, day, and year information with the current date. If s contains only a date and no time, this method assumes the time is 12:00 midnight. Any leading, inner, or trailing white space character in s is ignored. The date and time can be bracketed with a pair of leading and trailing NUMBER SIGN characters ('#', U+0023), and can be trailed with one or more NULL characters (U+0000).
Because the DateTime..::.TryParse(String, DateTime%) method tries to parse the string representation of a date and time using the formatting rules of the current culture, trying to parse a particular string across different cultures can either fail or return different results. If a specific date and time format will be parsed across different locales, use the DateTime..::.TryParse(String, IFormatProvider, DateTimeStyles, DateTime%) method or one of the overloads of the TryParseExact method and provide a format specifier.
If s contains no time zone information, result contains a DateTime value whose Kind property is DateTimeKind..::.Unspecified when the method returns. If the string to be parsed contains time zone information, result contains a DateTime value whose Kind property is DateTimeKind..::.Local when the method returns.
Notes to Callers: Formatting is influenced by properties of the current DateTimeFormatInfo object, which by default are derived from the Regional and Language Options item in Control Panel. The TryParse method can unexpectedly fail and return False if the current DateTimeFormatInfo..::.DateSeparator and DateTimeFormatInfo..::.TimeSeparator properties are set to the same value.