CSharp examples for System:DateTime Month
To Month Start
using System;/* w w w .j a va 2 s.c o m*/ public class Main{ public static DateTime ToMonthStart(this DateTime value) { return new DateTime(value.Year, value.Month, 1); } public static DateTime ToMonthStart(this string value) { DateTime date = Convert.ToDateTime(value); return new DateTime(date.Year, date.Month, 1); } }