Gemstone Common Library
Show/Hide TOC

# TimeParse(String, IFormatProvider) Method

Converts the string representation of a number in a specified culture-specific format to its Time equivalent.

## Definition

Namespace: Gemstone.Units
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.181 -- Release Build+97279656b5a55675063a4190481e67c4f9809501
C#
View Source Request Example

    public static Time Parse(
    	string s,
    	IFormatProvider? provider
    )

VB
View Source Request Example

    Public Shared Function Parse (
    	s As String,
    	provider As IFormatProvider
    ) As Time

C++
View Source Request Example

    public:
    static Time Parse(
    	String^ s,
    	IFormatProvider^ provider
    )

JavaScript
View Source Request Example

    Gemstone.Units.Time.Parse = function(s, provider);

#### Parameters

s String
  A string containing a number to convert.
provider IFormatProvider
  A IFormatProvider that supplies culture-specific formatting information about s.

#### Return Value

Time
A Time equivalent to the number contained in s.

## Exceptions

ArgumentNullException | s is null.
OverflowException | s represents a number less than MinValue or greater than MaxValue.
FormatException | s is not in the correct format.

## See Also

#### Reference

Time Structure
Parse Overload
Gemstone.Units Namespace