CSharp examples for System:DateTime Year
get datetime day month year format
using System.Globalization; using System;//from ww w . j a v a2s.co m public class Main{ /// <summary> /// get datetime day month year format /// </summary> /// <param name="date">Date</param> /// <returns>string format of date</returns> public static string DayMonthYear(this DateTime date) { return String.Format("{0:MM/dd/yyyy}", date); } }