DateTimeWithZone.ToString Method (string, CultureInfo, TimeZoneInfo)DateTimeWithZone.ToString Method (String, CultureInfo, TimeZoneInfo)DateTimeWithZone::ToString Method (String^, CultureInfo^, TimeZoneInfo^)
- XmlPrime 3.1
- Other Versions ▼
Converts the value of the current DateTimeWithZoneDateTimeWithZoneDateTimeWithZone object to its equivalent string representation
using the specified format and culture-specific format information.
Syntax
Public Function ToString( _ format As String, _ cultureInfo As System.Globalization.CultureInfo, _ timeZoneInfo As TimeZoneInfo _ ) As String
public string ToString( string format, System.Globalization.CultureInfo cultureInfo, TimeZoneInfo timeZoneInfo )
public: String^ ToString( String^ format, System.Globalization::CultureInfo^ cultureInfo, TimeZoneInfo^ timeZoneInfo )
Parameters
- format
- cultureInfo
Type: System.Globalization.CultureInfoSystem.Globalization.CultureInfoSystem.Globalization::CultureInfo^
A CultureInfoCultureInfoCultureInfo object that supplies culture-specific formatting information.
- timeZoneInfo
Type: XmlPrime.TimeZoneInfoXmlPrime.TimeZoneInfoXmlPrime::TimeZoneInfo^
The time zone information.
Return Value
Type: System.StringSystem.StringSystem::String^
A stringStringString representation of this DateTimeWithZoneDateTimeWithZoneDateTimeWithZone.
Exceptions
Exception | Condition |
ArgumentExceptionArgumentExceptionArgumentException | The syntax of the picture string in format is invalid. |
ArgumentNullExceptionArgumentNullExceptionArgumentNullException | format or cultureInfo is null
a null reference (Nothing in Visual Basic)
nullptr |
Remarks
The format must be a valid argument to the XSLT 2.0fn:format-dateTime
function.