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
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Javeed M ShaikhPosted Nov 7, 2011, 9:16 AM
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 ragsPosted Nov 7, 2011, 9:58 AM