SyntaxFix
Write A Post
Hire A Developer
Questions
Here you can add one month for the first day of current month than delete 1 day from that day.
DateTime now = DateTime.Now; var startDate = new DateTime(now.Year, now.Month, 1); var endDate = startDate.AddMonths(1).AddDays(-1);