SyntaxFix
Write A Post
Hire A Developer
Questions
Use this:
DateTime dateTime = DateTime.Now; DateTime? newDateTime = null; TimeSpan numberOfDays = new TimeSpan(2, 0, 0, 0, 0); newDateTime = dateTime.Add(numberOfDays);