i have two dates
ValidFrom : 20-04-2010
validTo : 02-05-2010
i need to know 4 days(date) before the validity expire .how to calculate the 4 days before date of the validity expire date 02-05-2010
i have two dates
ValidFrom : 20-04-2010
validTo : 02-05-2010
i need to know 4 days(date) before the validity expire .how to calculate the 4 days before date of the validity expire date 02-05-2010
var dt = new DateTime(2010, 5, 2);
var fourDaysBefore = dt.AddDays(-4);
If that's not what you mean, you're going to have to be much more specific.