Use the Parse() method to convert strings to TimeSpan instances : TimeSpan Parse : Date Time C# Examples


C# Examples » Date Time » TimeSpan Parse »

 

Use the Parse() method to convert strings to TimeSpan instances









    
using  System;

class  MainClas
{
    public  static  void  Main()
    {
        
        TimeSpan  myTimeSpan12  =  TimeSpan.Parse("1.8:10:30.1234567");
        Console.WriteLine("TimeSpan.Parse(\"1.8:10:30.1234567\")  =  "  +  myTimeSpan12);
    }
}
    
   
  
   



Output

TimeSpan.Parse("1.8:10:30.1234567") = 1.08:10:30.1234567


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Date Time
» TimeSpan Parse