<p>Is there a standard library method that converts a string that has duration in the standard ISO 8601 Duration (also used in XSD for its <code>duration</code> type) format into the .NET TimeSpan object?</p>

<p>For example, P0DT1H0M0S which represents a duration of one hour, is converted into New TimeSpan(0,1,0,0,0).</p>

<p>A Reverse converter does exist which works as follows:
Xml.XmlConvert.ToString(New TimeSpan(0,1,0,0,0))
The above expression will return P0DT1H0M0S.</p>

This will convert from xs:duration to TimeSpan:
```
```
System.Xml.XmlConvert.ToTimeSpan("P0DT1H0M0S")
```
```
See
http://msdn.microsoft.com/en-us/library/system.xml.xmlconvert.totimespan.aspx