CSharp examples for System:DateTime Calculate
Gets the future date.
// Copyright (c) Objectivity Bespoke Software Specialists. All rights reserved. using System.Globalization; using System;/* w w w. ja v a 2 s . com*/ public class Main{ /// <summary> /// Gets the future date. /// </summary> /// <param name="numberDaysToAddToNow">The number days to add from current date.</param> /// <returns>Date in future depends on parameter: numberDaysToAddToNow</returns> public static string GetFutureDate(int numberDaysToAddToNow) { return DateTime.Now.AddDays(numberDaysToAddToNow).ToString("ddMMyyyy", CultureInfo.CurrentCulture); } }