How To difference betwwen two dates
i enter date in text box choose by calander. but now i want to subract one text box date to other text box date value. my column name date data type is varchar. using code asp.net c#
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Subhendu DeRank #1,108 · 1.7K reputationPosted Dec 13, 2010, 9:11 PM EST
DateTime dt1 = Convert.ToDateTime(TextBox1.Text);
DateTime dt2 = Convert.ToDateTime(TextBox2.Text);
you can use (dt1-dt2) or dt1.Subtract(dt2)
Thanks.....
Om prakash Singh126 reputationPosted Aug 6, 2011, 2:56 AM EDT
datediff("d",date1,date2)