System::DateTime::Parse method

DateTime::Parse(const String&) method

Converts the specified string representation of a date and time value to the equivalent DateTime object.

static DateTime System::DateTime::Parse(const String &s)
ParameterTypeDescription
sconst String&The string representation of a date and time value to convert.

ReturnValue

A new instance of DateTime class that represents the date and time value equivalent to that represented by the specified string.

See Also

DateTime::Parse(const String&, const SharedPtr<IFormatProvider>&, Globalization::DateTimeStyles) method

Converts the specified string representation of a date and time value to the equivalent DateTime object using culture-specific format information.

static DateTime System::DateTime::Parse(const String &s, const SharedPtr<IFormatProvider> &provider, Globalization::DateTimeStyles styles=Globalization::DateTimeStyles::None)
ParameterTypeDescription
sconst String&The string representation of a date and time value to convert.
providerconst SharedPtr<IFormatProvider>&The IFormatProvider object that provides culture-specific format information.
stylesGlobalization::DateTimeStylesA bitwise combination of the enumeration values that provides additional information about s, about style elements that may be present in s, or about the conversion from s to a DateTime object.

ReturnValue

A new instance of DateTime class that represents the date and time value equivalent to that represented by the specified string.

See Also

DateTime::Parse(const String&, const SharedPtr<Globalization::CultureInfo>&, Globalization::DateTimeStyles) method

static DateTime System::DateTime::Parse(const String &s, const SharedPtr<Globalization::CultureInfo> &culture, Globalization::DateTimeStyles styles=Globalization::DateTimeStyles::None)

See Also

DateTime::Parse(const String&, const SharedPtr<Globalization::DateTimeFormatInfo>&, Globalization::DateTimeStyles) method

static DateTime System::DateTime::Parse(const String &s, const SharedPtr<Globalization::DateTimeFormatInfo> &dtfi, Globalization::DateTimeStyles styles=Globalization::DateTimeStyles::None)

See Also

DateTime::Parse(const String&, std::nullptr_t, Globalization::DateTimeStyles) method

static DateTime System::DateTime::Parse(const String &s, std::nullptr_t, Globalization::DateTimeStyles styles=Globalization::DateTimeStyles::None)

See Also