DateTime now = DateTime.Now; DateTime lastDayLastMonth = new DateTime(now.Year,now.Month,1); lastDayLastMonth = lastDayLastMonth.AddDays(-1);