using System;
using System.Text;
class Sample
{
public static void Main()
{
DateTime thisYear = new DateTime(2007, 1, 1);
Console.WriteLine(thisYear.ToShortDateString());
Console.WriteLine(thisYear.ToLongDateString());
}
}
The output:
1/1/2007
Monday, January 01, 2007