I am trying to check if a certain number of days has passed since a date and if it has then change the color of the grid row. So if the date is 12/11/2016 and I want to check if 10 days has passed since that date.
if (dt.Date > dt.Date.AddDays(10))
{
e.Item.Style.Add("background-color", "#C400F9");
break;
}
So adding 10 days to the 12th would be the 22/11/2016 and since today is the 23/11/2016 that means 10 days has passed. But all rows in the grid are changing to the color. Do I need to add another if statement to compare the date + the days passed to today's date?