Click or drag to resize

GregorianDateParse Method (String)

Converts the specified string representation of a date and time to its GregorianDate equivalent.

Note: GregorianDate is always assumed to be in UTC. You cannot parse strings containing time zone information. However, this will handle three common ISO8601 formats:

  • the extended format "YYYY-MM-DDThh:mm:ss.sZ"
  • The "day of year" equivalent "YYYY-DDDThh:mm:ss.sZ"
  • The basic format "YYYYMMDDThhmmss.sZ"

Namespace:  AGI.Foundation.Time
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.1.418.0 (24.1.418.0)
Syntax
public static GregorianDate Parse(
	string s
)

Parameters

s
Type: SystemString
A string containing a date and time to convert.

Return Value

Type: GregorianDate
A GregorianDate equivalent to the date and time contained in s.
Exceptions
ExceptionCondition
ArgumentNullException Thrown if s is .
FormatException Thrown if s does not contain a valid string representation of a date and time.
See Also