System.Xml.XmlConvert.ToString Method

Converts the DateTime to a string.

Syntax

[System.Obsolete]
public static string ToString (DateTime value)

Parameters

value
The value to convert.

Returns

A string representation of the DateTime in the format yyyy-MM-ddTHH:mm:ss where 'T' is a constant literal.

Remarks

Note:

The XmlConvert.ToString(DateTime) method is obsolete in the 2.0 version of the .NET Framework and has been replaced with the XmlConvert.ToString(DateTime, XmlDateTimeSerializationMode) method.

Requirements

Namespace: System.Xml
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0