I have here 2 datepicker for start date and end date.
how can I get the first day and last day of the current month
var myDate = DateTime.Now; var startOfMonth = new DateTime(myDate.Year, myDate.Month, 1); var endOfMonth = startOfMonth.AddMonths(1).AddDays(-1);
That should give you what you need.