EssentialsDate.ParseExact method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Time
Assembly Skybrud.Essentials.dll

ParseExact(string, string, IFormatProvider)

Static

Converts the specified string representation of a date to its EssentialsDate equivalent using the specified format and culture-specific format information. The format of the string representation must match the specified format exactly.

public static EssentialsDate ParseExact(string input, string format, IFormatProvider provider)

Parameters

input String

A string that contains a date to convert.

format String

A format specifier that defines the required format of input.

provider IFormatProvider

An object that supplies culture-specific format information about input.

Returns

An object that is equivalent to the date contained in input, as specified by format and provider.

ParseExact(string, string, IFormatProvider, DateTimeStyles)

Static

Converts the specified string representation of a date to its EssentialsDate equivalent using the specified format, culture-specific format information, and style. The format of the string representation must match the specified format exactly or an exception is thrown.

public static EssentialsDate ParseExact(string input, string format, IFormatProvider provider, DateTimeStyles styles)

Parameters

input String

A string containing a date and time to convert.

format String

A format specifier that defines the required format of s.

provider IFormatProvider

An object that supplies culture-specific formatting information about input.

A bitwise combination of the enumeration values that provides additional information about input, about style elements that may be present in input, or about the conversion from input to a EssentialsDate value. A typical value to specify is System.Globalization.DateTimeStyles.None.

Returns

An object that is equivalent to the date contained in input, as specified by format, provider, and styles.

ParseExact(string, String[], IFormatProvider, DateTimeStyles)

Static

Converts the specified string representation of a date to its EssentialsDate equivalent using the specified array of formats, culture-specific format information, and style. The format of the string representation must match at least one of the specified formats exactly or an exception is thrown.

public static EssentialsDate ParseExact(string input, String[] formats, IFormatProvider provider, DateTimeStyles styles)

Parameters

input String

A string that contains a date and time to convert.

formats Array of String

An array of allowable formats of input.

provider IFormatProvider

An object that supplies culture-specific format information about input.

A bitwise combination of enumeration values that indicates the permitted format of input. A typical value to specify is System.Globalization.DateTimeStyles.None.

Returns

An object that is equivalent to the date contained in input, as specified by formats, provider, and styles.