Mega Code Archive

 
Categories / C# / Date Time
 

Add the specified number of days to a DateTime

using System; using System.Globalization; class Sample  {     public static void Main()      {             // Calculate what day of the week is 36 days from this instant.       System.DateTime today = System.DateTime.Now;       System.DateTime answer = today.AddDays(36);       System.Console.WriteLine("{0:dddd}", answer);     } } //Saturday