Hi I am able to get the first day of the month using this code:
static string FirstMonth = DateTime.Today.AddDays(1 - DateTime.Today.Day).ToString("yyyy-MM-dd");
How do I get the last day of the month in the same date format?
Thanks
DateTime d = Convert.ToDateTime("2/4/15");
DateTime lastDayOfSameMonth = (new DateTime(d.Year, d.Month, 1)).AddMonths(1).AddDays(-1);