using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Dateformat
{
class Program
{
static void Main(string[] args)
{
DateTime dt = new DateTime(2014, 3, 9);
Console.WriteLine("\nMonth/day numbers without out zeroes");
Console.WriteLine("-----");
Console.WriteLine("{0}", String.Format("{0:M/d/yyyy}", dt));
Console.WriteLine("\nMonth/day numbers with zeros");
Console.WriteLine("----");
Console.WriteLine("{0}", String.Format("{0:MM/dd/yyyy}", dt));
Console.WriteLine("\nMonth with Partial digit");
Console.WriteLine("----");
Console.WriteLine("{0}", String.Format("{0:ddd, MMM d, yyyy}", dt));
Console.WriteLine("\nMonth with full digit");
Console.WriteLine("---");
Console.WriteLine("{0}", String.Format("{0:dddd, MMMM d, yyyy}", dt));
Console.WriteLine("\nYear with two digit");
Console.WriteLine("---");
Console.WriteLine("{0}", String.Format("{0:MM/dd/yy}", dt));
Console.WriteLine("\nYear with four digit");
Console.WriteLine("---");
Console.WriteLine("{0}", String.Format("{0:MM/dd/yyyy}", dt));
Console.ReadLine();
}
}
}