How can I convert an int to TimeSpan?
example 486000000000 is int as number of ticks. I want it to be represented as TimeSpan
How can I convert an int to TimeSpan?
example 486000000000 is int as number of ticks. I want it to be represented as TimeSpan
You can use the From methods, those will allow you to convert days/hours/minutes/seconds/milliseconds/ticks to TimeSpam format as follows:
TimeSpan ts = TimeSpan.FromTicks(486000000000);
Console.WriteLine(ts.ToString());
You can replace FromTicks with