Add 2 month to the date time : Date Time : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » Date Time »

 

Add 2 month to the date time








    
 

using System;
using System.Collections.Generic;
using System.Text;

class Program {
    static void Main(string[] args) {
        DateTime dt = new DateTime(2004, 10, 17);
        dt.AddMonths(2);  // Month is now December.
        Console.WriteLine("Daylight savings: {0}", dt.IsDaylightSavingTime());
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» Date Time