GregorianDateParseExact Method (String, String, IFormatProvider) |
Converts the specified string representation of a date and time to its
GregorianDate equivalent using the specified format and
culture-specific format information. The format of the string representation
must match the specified format exactly.
Note: GregorianDate is always assumed to be in UTC. You cannot
parse strings containing time zone information.
Namespace:
AGI.Foundation.Time
Assembly:
AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.3.420.0 (24.3.420.0)
Syntax public static GregorianDate ParseExact(
string s,
string[] format,
IFormatProvider provider
)
Public Shared Function ParseExact (
s As String,
format As String(),
provider As IFormatProvider
) As GregorianDate
public:
static GregorianDate ParseExact(
String^ s,
array<String^>^ format,
IFormatProvider^ provider
)
static member ParseExact :
s : string *
format : string[] *
provider : IFormatProvider -> GregorianDate
Parameters
- s
- Type: SystemString
A list of strings containing a date and time to convert. - format
- Type: SystemString
The expected format of s. - provider
- Type: SystemIFormatProvider
An IFormatProvider that supplies
culture-specific format information about s.
Return Value
Type:
GregorianDate
A
GregorianDate equivalent to the date and time contained in
s as specified by
format and
provider.
Exceptions Exception | Condition |
---|
ArgumentNullException |
Thrown if s or format is .
|
FormatException |
Thrown if s or format is an empty string,
or if s does not contain a date and time that corresponds to the
pattern specified in format.
|
See Also