Time Difference from two datetimepickers dispaly in textbox
Actually my requirement is: have a two datetimeickers and one textbox want to dispaly time difference between those two datetime pickers with hours and minits Sir please help me code: EL_TotalHrs.Text = (EL_ToTime.Value - EL_FromTime.Value).TotalHours.ToString("#");

Nitin SontakkeRank #264 · 9.6K reputationPosted Nov 21, 2016, 9:32 PM EST
Suvendu Shekhar GiriRank #546 · 4.4K reputationPosted Nov 21, 2016, 8:51 PM EST
yesubabu kRank #2,091 · 687 reputationPosted Nov 21, 2016, 8:58 PM EST
Suvendu Shekhar GiriRank #546 · 4.4K reputationPosted Nov 21, 2016, 9:03 PM EST
yesubabu kRank #2,091 · 687 reputationPosted Nov 21, 2016, 9:09 PM EST
Suvendu Shekhar GiriRank #546 · 4.4K reputationPosted Nov 21, 2016, 9:30 PM EST
Prateek SinglaRank #1,452 · 1.1K reputationPosted Nov 21, 2016, 9:37 PM EST
Nitin SontakkeRank #264 · 9.6K reputationPosted Nov 21, 2016, 11:02 PM EST
Prateek SinglaRank #1,452 · 1.1K reputationPosted Nov 23, 2016, 1:09 AM EST
DateTime firstDate= DateTime.Parse(textBox1.Text);
DateTime secondDate = DateTime.Parse(textBox2.Text);
string daydiff = (secondDate - firstDate).TotalDays.ToString();
textBox3.Text =daydiff2;