Extracting the current date/time : DateTime Now : Date Time C# Examples


C# Examples » Date Time » DateTime Now »

 

Extracting the current date/time









    
using  System;
using  System.Collections.Generic;
using  System.Globalization;
using  System.IO;
using  System.Text;
using  System.Security.Cryptography;

public  class  MainClass
{
        public  static  void  Main()
        {
                DateTime  localNow  =  DateTime.Now;
                Console.WriteLine("{0}  -  {1}  ({2})",  localNow,  localNow.Kind,
                        TimeZone.CurrentTimeZone.StandardName);
                DateTime  utcNow  =  DateTime.UtcNow;
                Console.WriteLine("{0}  -  {1}",  utcNow,  utcNow.Kind);
        }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Date Time
» DateTime Now