CSharp examples for Language Basics:Date Time
Create a DateTime object from a specific date
using System;//from w w w . j a v a2 s . c o m using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Program { static void Main(string[] args) { // A specific date DateTime overlordDday = new DateTime(1944, 6, 6); // Output Console.WriteLine("D-Day (Overlord operation): " + overlordDday.ToLongDateString() + "."); } }