I need to check a difference between a given date and current date is less than 365days?
i tried some thing like this.
System.TimeSpan diff = DateTime.UtcNow.Subtract((DateTime)customer.LastValidationDate);
result = (diff.Days < 1);
this doesn't seem to work correct for few dates.
i need to achieve: if given date and current date difference is less-than or equal to 1 year (365 days) return true else return false.