To Short Date Time String - CSharp System

CSharp examples for System:DateTime Format

Description

To Short Date Time String

Demo Code


using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;//from w w  w.  j ava  2  s.  co  m

public class Main{
        public static string ToShortDateTimeString(this DateTime dt){
         return dt.ToShortDateString() + " " + dt.ToShortTimeString();
      }
}

Related Tutorials