Stop converting to strings, and convert to DateTime instead:
If your value in the DatagridView is a DateTime, then use it directly:
DateTime i = (DateTime) datagridview.currentrow.cell[4].value;
If it's a string, then Parse it:
DateTime i;
if (!DateTime.TryParse(datagridview.currentrow.cell[4].value.ToString(), out i))
{
...
return;
}
Then you can just subtract:
Timespan diff = i - DateTime.Now;
textbox1.Text = diff.Days.ToString();
If you don't want days, then there are other options:
TimeSpan Properties (System)[
^]