Hi, there are only two cases that could work well: 1. you have date AND time information, not just time. Then a TimeSpan calculated as the difference of two DateTime values is perfect. 2. you only have time information, but you also know the context enforces something. In your case it would be: the time worked is anywhere between 0 and 24 hours. So, calculate the difference in any way you see fit (even with TimeSpan=DateTime-DateTime where both DateTimes have the same or no date), then enforce your boundary conditions: if the TimeSpan is less than zero, add 24 hours. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.