Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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
)

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 http://www.w3.org/TR/xmlschema-2/#dateTime.)

Return Value

Type: System::String^

A String representation in the specified format of the supplied DateTimeOffset.

The following example converts a DateTimeOffset representation of the current time to a String in the specified format.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2017 Microsoft