How to Get the First and Last Day of the Month in C#
A month-end sales report I built for a retail client in Columbus, Ohio kept dropping orders placed on October 31. The C# code that picked the month’s first and last day looked fine, but the boundary was wrong. Here’s the short answer for C#: the first day of the month is new DateTime(d.Year, d.Month, 1), … Read more >>