Output DateTime object : Date Time : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » Date Time »

 

Output DateTime object








    
 

using System;
using System.Globalization;

public class DatesApp {
    public static void Main(string[] args) {
        DateTime dt = DateTime.Now;
        Console.WriteLine(dt);
        Console.WriteLine("date = {0}, time = {1}\n",dt.Date, dt.TimeOfDay);
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» Date Time