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.
Dustrock - you are correct - my function was working. I had someone validate that for me. Thank you for your help.
.NET Programming
The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.
ASKER