The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
XmlConvert::ToDateTime Method (String^, array<String^>^)
.NET Framework (current version)
Namespace:
System.Xml
Assembly: System.Xml (in System.Xml.dll)
Return to top
Assembly: System.Xml (in System.Xml.dll)
Parameters
- s
-
Type:
System::String^
The string to convert.
- formats
-
Type:
array<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 |
|---|---|
| ArgumentNullException | 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. |
This method allows multiple formats for the string to be validated against.
.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Show: