How to calculate correctly timedifference between two time to show correctly number days hours minutes. The code I wrote shows wrong time span. As I show on the following picture:
My code:
private void button1_Click(object sender, EventArgs e)
{
TimeSpan ts = dateTimePicker2.Value - dateTimePicker1.Value;
textBox1.Text = ts.ToString();
string total = textBox1.Text;
string[] TotalTIme = textBox1.Text.Split('.');
textBox1.Text = TotalTIme[0];
}