Hi,
I have two water marked textbox with HH:MM as water marked. start time textbox1, end time textbox 2. I need to find the difference between textbox 2 and textbox1 and validate as per.
Thanks,
Vijay
How to find the time difference for HH:MM format from two textbox
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Javeed M ShaikhRank #839 · 2.7K reputationPosted Nov 7, 2011, 4:16 AM EST
try this..
DateTime dt1 = DateTime.ParseExact(textbox1.text, "HH:mm", new DateTimeFormatInfo());
DateTime dt2 = DateTime.ParseExact(textbox2.text, "HH:mm", new DateTimeFormatInfo());
TimeSpan ts1 = dt1.Subtract(dt2);
vijay rags58 reputationPosted Nov 7, 2011, 4:58 AM EST