XmlConvert.ToString Method (DateTimeOffset, String)

Converts the supplied DateTimeOffset to a String in the specified format.

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

public static string ToString(
	DateTimeOffset value,
	string format


Type: System.DateTimeOffset
The DateTimeOffset to be converted.
Type: System.String
The format to which s is converted. The format parameter can be any subset of the W3C Recommendation for the XML dateTime type. For more information see XML Schema Part 2: Datatypes.

Return Value

Type: System.String
A String representation in the specified format of the supplied DateTimeOffset.


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions