- format
- The format structure to apply to the converted DateTime. Valid formats include "yyyy-MM-ddTHH:mm:sszzzzzz" and its subsets. The string is validated against this format.
- s
- The string to convert.
- format
- The format structure to apply to the converted DateTime. Valid formats include "yyyy-MM-ddTHH:mm:sszzzzzz" and its subsets. The string is validated against this format.
A DateTime equivalent of the string.
Type Reason ArgumentNullException s is a null reference. FormatException s or format is string.Empty .
-or-
s does not contain a date and time that corresponds to format.
This method calls DateTime.ParseExact(string, string, IFormatProvider)(s, format, System.Globalization.DateTimeFormatInfo.InvariantInfo, System.Globalization.DateTimeStyles.AllowLeadingWhite|System.Globalization.DateTimeStyles.AllowTrailingWhite).
Valid formats include "yyyy-MM-ddTHH:mm:sszzzzzz" and its subsets.