Compartir a través de


XmlConvert.ToString Method (DateTimeOffset, String)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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

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

Syntax

'Declaration
Public Shared Function ToString ( _
    value As DateTimeOffset, _
    format As String _
) As String
public static string ToString(
    DateTimeOffset value,
    string format
)

Parameters

  • 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.

Version Information

Silverlight

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

Platforms

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