display the Date, Day, DayOfWeek, DayOfYear,Ticks, and TimeOfDayProperties of myDateTime : Date Time : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » Date Time »

 

display the Date, Day, DayOfWeek, DayOfYear,Ticks, and TimeOfDayProperties of myDateTime








    
 
using System;

class MainClass {

    public static void Main() {

        DateTime myDateTime = DateTime.Now;
        Console.WriteLine("myDateTime.Date = " + myDateTime.Date);
        Console.WriteLine("myDateTime.Day = " + myDateTime.Day);
        Console.WriteLine("myDateTime.DayOfWeek = " + myDateTime.DayOfWeek);
        Console.WriteLine("myDateTime.DayOfYear = " + myDateTime.DayOfYear);
        Console.WriteLine("myDateTime.Ticks = " + myDateTime.Ticks);
        Console.WriteLine("myDateTime.TimeOfDay = " + myDateTime.TimeOfDay);
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» Date Time