I want to add entry date + 1year to a column called finishing date.
If the entry date is in leap yr, i need to add 364 days, if not 365 days.
Is there a way to check this in c#, using current datetime’s year & manipulate leap yr/not, then add the days.
Thanks.
You can use the DateTime.IsLeapYear method.
But just for handling that you do not really need to use that method.
DateTime.AddYearstakes leap years into account.