CSharp examples for System:DateTime Year
To Month Year
using System.Threading.Tasks; using System.Text; using System.Linq; using System.Collections.Generic; using System;//w w w. j a va 2 s. c om public class Main{ public static string ToMonthYear(this DateTime value, string format = "MM/yyyy") { return value.ToString(format); } }