I need to convert my string to time span in c#, Here is my string 52:13:27.0000000
When I am trying Timespan.parse it is giving error
The TimeSpan could not be parsed because at least one of the numeric components is out of range or contains too many digits.
Please help! Thanks
TimeSpan.Parse()
accepts Days:Hours:Minutes:Seconds:Miliseconds
if you want to have more than 24 hours, you have to add a day.
In your specific case, it should be something like the following:
TimeSpan.Parse("2:04:13:27.0000000");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With