# timespan::parse

[This is preliminary documentation and subject to change.]

Constructs a TimeSpan from a time indicated by a specified string.

### Usage

`timespan timespan::parse(s)`

### Parameters

Name | Type | Description
--- | --- | ---
s | string | A string.

### Return Value

A TimeSpan that corresponds to s.

### Exceptions

The function will fail in any of the following circumstances:

- s has an invalid format.
- At least one of the hours, minutes, or seconds components is outside its valid range.

### Requirements

Assembly: NAnt.Core (0.91.3881.0)