Format time and date : DateTime Format : Date Time C# Examples


C# Examples » Date Time » DateTime Format »

 

Format time and date









    
using  System;    
    
class  MainClass  {    
    public  static  void  Main()  {    
        DateTime  dt  =  DateTime.Now;  
  
        Console.WriteLine("Use  m  for  day  of  month:  {0:m}",  dt);  
    }  
}
    
   
  
   



Output

Use m for day of month: March 25


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Date Time
» DateTime Format