Assuming the two values being retrieved from the dataset are dates, this is the way I'd do it (untested code):
for (int ...)
{
tarih1 = dataGridView1.Rows[k].Cells[4].Value.ToString();
tarih2 = dataGridView1.Rows[k].Cells[5].Value.ToString();
DateTime tarihDate1;
DateTime tarihDate2;
if (DateTime.TryParse(tarih1, out tarihDate1) && DateTime.TryParse(tarih2, out out tarihDate2))
{
TimeSpan span = tarihDate2 - tarihDate1;
if (span.Days == 7)
{
btn.BackColor = Color.Red;
}
}
}
Go forth, and code.