CSharp examples for System:DateTime Month
Method for getting first day in month
using System.Threading; using System.Globalization; using System.Collections.Generic; using System;//from ww w. j a v a 2s . c o m public class Main{ /// <summary> /// Method for getting first day in month /// </summary> /// <param name="date">Date</param> /// <returns>First day in month</returns> public static DateTime GetFirstDay(this DateTime date) { return new DateTime(date.Year, date.Month, 1); } }