## XmlConvert::ToTimeSpan method


Converts the [String](../../../system/string/) to a [TimeSpan](../../../system/timespan/) equivalent.

```cpp
static TimeSpan System::Xml::XmlConvert::ToTimeSpan(const String &s)
```


| Parameter | Type | Description |
| --- | --- | --- |
| s | const String\& | The string to convert. The string format must conform to the W3C XML [Schema](../../../system.xml.schema/) Part 2: Datatypes recommendation for duration. |

### ReturnValue

A [TimeSpan](../../../system/timespan/) equivalent of the string.

## See Also

* Class [TimeSpan](../../../system/timespan/)
* Class [String](../../../system/string/)
* Class [XmlConvert](../)
* Namespace [System::Xml](../../)
* Library [Aspose.PUB for C++](../../../)
