How to convert timespan HH:MM:SS into only Seconds

If you value is in the data type of timespan you can use the .TotalSeconds function:

TimeSpan.Parse(“00:04:33”).TotalSeconds

returns value 273

5 Likes