Duration.ParseTimeSpan
Duration.ParseTimeSpan method
Parses duration string in format “PT–H–M–S–”.
public static TimeSpan ParseTimeSpan(string value)
Parameter | Type | Description |
---|---|---|
value | String | the specified string to parse. |
Return Value
returns parsed instance of the TimeSpan
struct.
Examples
Shows how to convert a string into a time span.
var timeSpan = Duration.ParseTimeSpan("PT1H10M30S");
Console.WriteLine("The parsed time span: " + timeSpan);
See Also
- struct Duration
- namespace Aspose.Tasks
- assembly Aspose.Tasks