using System;
using System.Globalization;
class MainClass {
public static void Main() {
DateTime dt = new DateTime();
DateTime dt1 = new DateTime(2001, 12, 31);
DateTime dt2 = new DateTime(2000, 12, 31, 23, 59, 59);
// Print them out as strings
Console.WriteLine("DT as string: {0}", dt.ToString());
Console.WriteLine("DT1 as string: {0}", dt1.ToString());
Console.WriteLine("DT2 as string: {0}", dt2.ToString());
}
}
|