XmlConvert.ToDateTime Method (String, String[])
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Assembly: System.Xml (in System.Xml.dll)
Parameters
- s
- Type: System.String
The string to convert.
- formats
- Type:
System.String
[]
An array containing the format structures to apply to the converted DateTime. Valid formats include "yyyy-MM-ddTHH:mm:sszzzzzz" and its subsets.
| Exception | Condition |
|---|---|
| NullReferenceException | s is null. |
| FormatException | s or an element of formats is String.Empty -or- s does not contain a date and time that corresponds to any of the elements of formats. |
Show: