how to subtract two txtbox datetime values and get value in third txtbox
plz rply soon
i need it urgently,,,,,,
plz rply soon.............
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.
Vithal WadjePosted Dec 31, 2012, 1:11 AM
Vishnujeet KumarPosted Dec 31, 2012, 12:35 AM
DateTime christmas = Convert.ToDateTime(textBox1.Text);
DateTime newYears = Convert.ToDateTime(textBox2.Text);
TimeSpan span = newYears.Subtract(christmas);
textBox3.Text = span.ToString();