TryParseExact()

DateTimeOffset::TryParseExact(const String&, const ArrayPtr<String>&, const SharedPtr<IFormatProvider>&, Globalization::DateTimeStyles, DateTimeOffset&) method

Tries to converts the specified string to DateTimeOffset object using the specified formats, format provider and formatting style.

static bool System::DateTimeOffset::TryParseExact(const String &input, const ArrayPtr<String> &formats, const SharedPtr<IFormatProvider> &provider, Globalization::DateTimeStyles styles, DateTimeOffset &result)

Arguments

ParameterTypeDescription
inputconst String&String to convert.
formatsconst ArrayPtr<String>&Arrays of format strings.
providerconst SharedPtr<IFormatProvider>&Format provider.
stylesGlobalization::DateTimeStylesDate and time formatting styles.
resultDateTimeOffset&DateTimeOffset that is equivalent to the input.

Return Value

true if the input converted successfully, otherwise - false.

DateTimeOffset::TryParseExact(const String&, const String&, const SharedPtr<IFormatProvider>&, Globalization::DateTimeStyles, DateTimeOffset&) method

Tries to converts the specified string to DateTimeOffset object using the specified format, format provider and formatting style.

static bool System::DateTimeOffset::TryParseExact(const String &input, const String &format, const SharedPtr<IFormatProvider> &provider, Globalization::DateTimeStyles styles, DateTimeOffset &result)

Arguments

ParameterTypeDescription
inputconst String&String to convert.
formatconst String&Format string.
providerconst SharedPtr<IFormatProvider>&Format provider.
stylesGlobalization::DateTimeStylesDate and time formatting styles.
resultDateTimeOffset&DateTimeOffset that is equivalent to the input.

Return Value

true if the input converted successfully, otherwise - false.

See Also