CSharp examples for System:DateTime Day
Get Date For Last Day Of Month
using System.Globalization; using System.Windows.Forms; using System.Text; using System.Linq; using System.Collections.Generic; using System;/* ww w. j av a 2 s .com*/ public class Main{ // ----------------------------------------------------------------------- // GetDateForLastDayOfMonth // ----------------------------------------------------------------------- public static DateTime GetDateForLastDayOfMonth(DateTime oDateTime) { DateTime oLastDateInMonth = new DateTime( oDateTime.Year, oDateTime.Month, DateTime.DaysInMonth(oDateTime.Year, oDateTime.Month) ); return oLastDateInMonth; } }