using System; public class Test { public static void Main() { DateTime t = DateTime.Now; Console.WriteLine(t.ToString()); Console.WriteLine(t.ToShortDateString()); Console.WriteLine(t.ToLongDateString()); Console.WriteLine(t.ToString()); } }
Standard input is empty
1/19/2017 1:03:25 PM 1/19/2017 Thursday, January 19, 2017 1/19/2017 1:03:25 PM
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!