# timespan::parse

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.90.3780.0)