XmlConvert.ToString Method (DateTime)

Note: This API is now obsolete.

Converts the DateTime to a String.

Namespace:   System.Xml
Assembly:  System.Xml (in System.Xml.dll)

[ObsoleteAttribute("Use XmlConvert.ToString() that takes in XmlDateTimeSerializationMode")]
public static string ToString(
	DateTime value


Type: System.DateTime

The value to convert.

Return Value

Type: System.String

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


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.

.NET Framework
Available since 1.1
Return to top