CSharp examples for System:DateTime Day
Get Date For First Day Of Month
using System.Globalization; using System.Windows.Forms; using System.Text; using System.Linq; using System.Collections.Generic; using System;/*from w w w .j a v a 2s.c o m*/ public class Main{ // ----------------------------------------------------------------------- // GetDateForFirstDayOfMonth // ----------------------------------------------------------------------- public static DateTime GetDateForFirstDayOfMonth(DateTime oDateTime) { DateTime dtFirstDayOfMonth = new DateTime( oDateTime.Year, oDateTime.Month, 1 ); return dtFirstDayOfMonth; } }