Convert TimeSpan string in CSharp
Description
The following code shows how to convert TimeSpan string.
Example
using System;//from w w w .ja va 2 s. c o m
public class ToString
{
public static void Main()
{
TimeSpan span = TimeSpan.Zero;
Console.WriteLine(span);
// Initialize a time span to 14 days.
span = new TimeSpan(-14, 0, 0, 0, 0);
Console.WriteLine(span);
}
}
The code above generates the following result.