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
java2s.com | Contact Us | Privacy Policy |
Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
All other trademarks are property of their respective owners. |