How do I get the last day of a month? September 18, 2022 by Tarik The last day of the month you get like this, which returns 31: DateTime.DaysInMonth(1980, 08);