System.Xml.XmlConvert.ToDateTime Method

Converts the string to a DateTime using the System.Xml.XmlDateTimeSerializationMode specified

Syntax

public static DateTime ToDateTime (string s, XmlDateTimeSerializationMode dateTimeOption)

Parameters

s
The string value to convert.
dateTimeOption
One of the System.Xml.XmlDateTimeSerializationMode values that specify whether the date should be converted to local time or preserved as Coordinated Universal Time (UTC), if it is a UTC date.

Returns

A DateTime equivalent of the string.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0