I have an app that includes a calendar that allows users to select dates. The customer wants to allow the users to schedule their meetings with this web page. The user selects a date (like today) from a calendar. Then, they enter a number in a field. The code needs to calculate today's date plus the number of years entered in the text box and display that as a date. Example: today plus 5 years = 1/7/2019.
Here is the code that I'm trying to use to perform the calculation:
DateTime myStartDate, myEndDate;
myEndDate.AddDays (this displays the date selected by the calendar)
Is there a tutorial or webpage that displays the proper formatting to do what I'm trying to do? I've tried myEndDate.AddDays(1), myEnddate.addDays(-1), etc but nothing works. As you can tell, I am new to this so any help is appreciated.