How do I do arithmetic operations on HH:MM:SS format time strings in C#?

Posted by Jake on Stack Overflow See other posts from Stack Overflow or by Jake
Published on 2011-01-11T21:48:16Z Indexed on 2011/01/11 21:53 UTC
Read the original article Hit count: 238

Filed under:
|

I have a series of times that are coming to me as strings from a web service. The times are formated as HH:MM:SS:000 (3 milisecond digits). I need to compare two times to determine if one is more than twice as long as the other:

if ( timeA / timeB > 2 )

What's the simplest way to work with the time strings?


If I was writing in Python this would be the answer to my question: Difference between two time intervals in Python

© Stack Overflow or respective owner

Related posts about c#

Related posts about time