To Short Date String - CSharp System

CSharp examples for System:DateTime Format

Description

To Short Date String

Demo Code


using System;/*w  w w  . j ava  2  s.co  m*/

public class Main{
        public static string ToShortDateString(this DateTime dateTime)
        {
            return dateTime.ToString("d");
        }
}

Related Tutorials