System::Xml::XmlConvert::ToDateTime method

XmlConvert::ToDateTime(const String&) method

Converts the String to a DateTime equivalent.

static DateTime System::Xml::XmlConvert::ToDateTime(const String &s)
ParameterTypeDescription
sconst String&The string to convert.

ReturnValue

A DateTime equivalent of the string.

See Also

XmlConvert::ToDateTime(const String&, const String&) method

Converts the String to a DateTime equivalent.

static DateTime System::Xml::XmlConvert::ToDateTime(const String &s, const String &format)
ParameterTypeDescription
sconst String&The string to convert.
formatconst String&The format structure to apply to the converted DateTime. Valid formats include “yyyy-MM-ddTHH:mm:sszzzzzz” and its subsets. The string is validated against this format.

ReturnValue

A DateTime equivalent of the string.

See Also

XmlConvert::ToDateTime(const String&, const ArrayPtr<String>&) method

Converts the String to a DateTime equivalent.

static DateTime System::Xml::XmlConvert::ToDateTime(const String &s, const ArrayPtr<String> &formats)
ParameterTypeDescription
sconst String&The string to convert.
formatsconst ArrayPtr<String>&An array containing the format structures to apply to the converted DateTime. Valid formats include “yyyy-MM-ddTHH:mm:sszzzzzz” and its subsets.

ReturnValue

A DateTime equivalent of the string.

See Also

XmlConvert::ToDateTime(const String&, XmlDateTimeSerializationMode) method

Converts the String to a DateTime using the XmlDateTimeSerializationMode specified.

static DateTime System::Xml::XmlConvert::ToDateTime(const String &s, XmlDateTimeSerializationMode dateTimeOption)
ParameterTypeDescription
sconst String&The String value to convert.
dateTimeOptionXmlDateTimeSerializationModeOne of the enumeration values that specify whether the date should be converted to local time or preserved as Coordinated Universal Time (UTC), if it is a UTC date.

ReturnValue

A DateTime equivalent of the String.

See Also