ToString Method (DateTimeOffset, String)

XmlConvert.ToString Method (DateTimeOffset, String)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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
)

Parameters

value
Type: System.DateTimeOffset
The DateTimeOffset to be converted.
format
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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft